Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

Re: ant tasks for converting from docbook ?

Dave Pawson

2008-04-23

Replies: Find Java Web Hosting

Author LoginPost Reply
On 23/04/2008, Ronald Johnson <rj.1970@(protected):
> Hi,
>
> what are the "standard" (i.e. the tasks many people use) for
> converting docbook to html/pdf ?
> What library is most common used for this task (or is it possible to
> do it with the tasks that are delivered with ant?)
>
> If anyone have examples I would be greatful,


<target name="docbook" depends="init, clean, validate">
<java classname="${xslt.processor.class}"
 fork="yes"
 dir="${in.dir}"
 failonerror="true">
  <classpath refid="xslt.processor.classpath" />
  <jvmarg line="-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration"/>
  <jvmarg line="-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
  <jvmarg line="-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
  <arg value="-l"/>
  <arg value="-o"/>
  <arg value="${out.dir}/${main.outfile}"/>
  <arg line="-x org.apache.xml.resolver.tools.ResolvingXMLReader"/>
  <arg line="-y org.apache.xml.resolver.tools.ResolvingXMLReader"/>
  <arg line="-r org.apache.xml.resolver.tools.CatalogResolver "/>
  <arg line="${in.dir}/${main.infile} ${main.stylesheet}
${param.args.post}" />
</java>
<tstamp>
  <format property="fintim" pattern="E @ H:m a" locale="en,UK"/>
</tstamp>
<echo>Finished at ${fintim}</echo>
</target>


Provides a chunked html output.

<target name="fo" depends="init, validate, clean.pdf">
<echo>Generate the fo output</echo>
<java classname="${xslt.processor.class}"
   fork="yes"
   dir="${in.dir}"
   failonerror="true">
<classpath refid="xslt.processor.classpath" />
<jvmarg value="-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration"/>
<jvmarg value="-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
<jvmarg value="-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
<arg value="-l"/>
<arg value="-o"/>
<arg value="${out.fo.dir}/${main.fo.outfile}"/>
<arg value="-x"/>
<arg value="org.apache.xml.resolver.tools.ResolvingXMLReader"/>
<arg value="-y"/>
<arg value="org.apache.xml.resolver.tools.ResolvingXMLReader"/>
<arg value="-r"/>
<arg value="org.apache.xml.resolver.tools.CatalogResolver"/>
<arg value="${in.dir}/${main.infile}"/>
<arg value="${main.fo.stylesheet}" />
</java>
</target>

Provides the fo output. Calling fop is easier than xep or ah.

HTH



--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.