OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Ant XSLT task error


On Fri, Nov 30 2007 15:53:51 +0000, eric.johnson@iona.com wrote:
> That is great example of getting the catalog resolver to work with the
> XSLT task. Do any of the also include the XInclude support?

It's not strictly necessary to use your own CatalogManager.properties
when using the xslt task: I can no longer remember why I did that.

I typically take the easy way out and put both saxon.jar (or saxon8.jar,
or now saxon9.jar) and resolver.jar in Ant's lib directory so Ant can
find them without my having to set a classpath.

Looking at the Saxon 8.9 source code [1], the feature key to enable
XInclude processing is:

   http://saxon.sf.net/feature/xinclude-aware

So, the (untested) way to do XInclude processing while letting Ant
handle catalogs would be:

  <target name="convert.single" depends="init">
    <xslt style="${stylesheet}"
          in="in/${in}"
          out="out/${out}"
          extension=".xml"
          force="true">
      <factory name="net.sf.saxon.TransformerFactoryImpl">
        <attribute name="http://saxon.sf.net/feature/xinclude-aware";
                   value="true"/>
      </factory>
      <xmlcatalog refid="catalog"/>
    </xslt>
  </target>

(It's been a while since I've set a boolean TransformerFactory attribute
value.)

Regards,


Tony Graham.
======================================================================
Tony.Graham@MenteithConsulting.com   http://www.menteithconsulting.com

Menteith Consulting Ltd             Registered in Ireland - No. 428599
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
----------------------------------------------------------------------
Menteith Consulting -- Understanding how markup works
======================================================================

[1] http://saxon.svn.sourceforge.net/viewvc/saxon/latest8.9/bj/net/sf/saxon/FeatureKeys.java?view=markup


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]