[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Error in Apache Ant task with Saxon from DocBook to epub
On Mon, September 5, 2011 1:27 pm, Lars Vogel wrote: > I'm trying to use an Apache Ant task to translate DocBook to epub via the > docbook-xsl.1.76.1 stylesheets. > > I receive the following error message: > > C:\Users\vogella\workspace_sapmobile\test\docbook-xsl-1.76.1\epub\docbook.xsl:1275:30: > Fatal Error! The priority attribute must be absent if the match attribute > is > absent > [xslt] > > In input is a very simple book.xml file and my relevant build.xml looks > like > the following: > > <target name="build-epub" depends="depends" description="Generates EPUB > files from DocBook XML"> > <xslt style="${epub.stylesheet}" extension=".html" basedir="${documents}" > destdir="${output.dir}"> > <include name="**/*book.xml" /> > <include name="**/*article.xml" /> > <classpath refid="saxon.class.path" /> > </xslt> > </target> There looks to be a problem with your XSLT and with your classpath and XSLT processor selection. The problem is being reported by the XSLT processor, but it probably isn't Saxon that's doing it. Firstly, check your Ant version. Ant has occasionally flip-flopped over whether xsl/@classpath actually works. The news for Ant 1.8.2 [1] includes "XSLT task honors classpath again (bugrep 49271)", so it may pay to upgrade. Secondly, you need to tell Ant to use Saxon by using <factory> within your <xslt>, e.g.: <factory name="net.sf.saxon.TransformerFactoryImpl"> See the <xslt> description [2], or see it used in the second example in [3]. Lastly, it is an XSLT error to have @priority without @match. See the second paragraph in [4]. Regards, Tony Graham tgraham@mentea.net Consultant http://www.mentea.net Mentea 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- XML, XSL FO and XSLT consulting, training and programming [1] Currently at http://ant.apache.org/ [2] http://ant.apache.org/manual/Tasks/style.html from http://ant.apache.org/manual/index.html [3] http://inasmuch.as/2011/08/18/saxon-feature-keys/ [4] http://www.w3.org/TR/xslt-21/#defining-templates
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]