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>

Reply via email to