[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Webhelp questions: catalogs and xpointers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Jeff,
Yes, you'd have to modify the supplied build.xml to use catalogs. Last
time I used catalogs with ant, you had to have the resolver jar
available (in the classpath? or ant lib dir?) to make it work. There
was also a simpler catalog format you could use inside your ant
build.xml that didn't require an extra library. Things may have
changed since then, but that's what I recall. The docs are here:
https://ant.apache.org/manual/Types/xmlcatalog.html
However, it sounds as if you'd prefer to exec xsltproc instead of
using Saxon. If you stick with Ant, you could exec xsltproc (and xmllint):
https://ant.apache.org/manual/Tasks/exec.html
As part of this summer's GSoC project, one of the students is creating
a Makefile to build webhelp using xsltproc. You could use that as a
starting point too.
It's difficult to provide a build script that covers everyone's needs.
What's there will work for some people and provide inspiration and
guidance to allow others to integrate it into their system.
David
On 06/20/2012 06:55 PM, Jeff Powanda wrote:
> I use an XML catalog with Saxon, so I was surprised that the
> Webhelp build.xml file does not specify a catalog resolver. I’ve
> tried importing the default build.xml file into my project’s build
> file (as the documentation recommends), but it fails to resolve the
> catalog entries. I’m not sure how to do it, although I did see the
> following Ant macro in the Apache Velocity project that seems to do
> the trick. Am I on the right track?
>
>
>
> Also, for my other HTML projects I use xmllint to preprocess the
> XML source files into one file to resolve xincludes that use
> xpointers, something Xerces doesn’t currently support. I assume
> I’ll need to do the same to generate Webhelp, but wonder if anyone
> has found another solution for dealing with xpointers.
>
>
>
> Regards,
>
> Jeff Powanda
>
> Vocera Communications
>
>
>
>
>
> <!--
> ========================================================================
> -->
>
> <!-- ==
> == -->
>
> <!-- == Saxon Converter macro that uses commons-resolver
> == -->
>
> <!-- ==
> == -->
>
> <!-- == input: The file to transform
> == -->
>
> <!-- == output: The transformation result
> == -->
>
> <!-- == style: The Style Sheet used for the transformation
> == -->
>
> <!-- ==
> == -->
>
> <!--
> ========================================================================
> -->
>
> <macrodef name="saxon">
>
> <attribute name="input"/>
>
> <attribute name="output"/>
>
> <attribute name="style"/>
>
> <sequential>
>
> <java classname="com.icl.saxon.StyleSheet" fork="true"
>
> dir="${basedir}" classpathref="dbf.classpath">
>
> <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 value="-o"/>
>
> <arg value="@{output}"/>
>
> <arg value="@{input}"/>
>
> <arg value="@{style}"/>
>
> </java>
>
> </sequential>
>
> </macrodef>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJP4p5SAAoJEMHeSXG7afUhp4wIAIt3vx884Y4o6vpphGQLXv9Y
gRdOdvdU9GdmcYdzVi7N+JtITBfSPRN7Ul1fJ7XPxx9G40O3jxHik+rJuaejTIOi
EupiU27jSIAQ0aTaBnqT//P0wUd3R4yQi0ERLE5TXv1n271LiMB3Tp8XxdQd8j2/
qy0+6UDvPv/GE2T2GaFuwpgYc/LVydn5sQzhxA48LJmZR3rSXoOZ3Uhkd9Z+B797
FMHg3igbbeJZfhiDALMOClZfm/esLy4XXnZa1IbnkDrLNF7T+wYSWYxctLEfJjOs
IXVnlitg3V7uImKp4l3rZxLeSpSrTbBsoU81aQvpIJ7dvp3kce1GrSDjBEOyjH8=
=1hv7
-----END PGP SIGNATURE-----
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]