You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ronald Johnson <rj...@googlemail.com> on 2008/04/23 15:32:21 UTC

ant tasks for converting from docbook ?

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,

RJ

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: ant tasks for converting from docbook ?

Posted by Dave Pawson <da...@gmail.com>.
On 23/04/2008, Ronald Johnson <rj...@googlemail.com> wrote:
> 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@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org