ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kerry, Richard" <>
Subject RE: Use of XML Catalog with Ant (xslt task) - request for example
Date Fri, 16 Aug 2013 09:34:37 GMT

I don't think this covers my use cases, in particular :

1.  External catalog file (Catalog.xml).

2.  Use of the catalog to find the xsl file for the transform (ie the "style" attribute or
sub-element of <xslt>).

Does anyone have an example using these ?

1.  I've developed the catalog while doing other processing using Saxon, which is accessed
using a Java task.  In that case Saxon takes parameters indicating where to find the catalog
file (more accurately the folder containing, which points to the

The documentation for Ant's Xslt task indicates that this is possible but there are no examples
there and nothing I've tried so far has managed to make it work.

The example submitted here contains the catalog contents in a <xmlcatalog> element,
not a reference to a catalog file.

2.  The example submitted here doesn't appear to use a catalog to get the style file - there
is no mention of "xml/doc.xsl" in the <xmlcatalog> shown.

3.  The Ant documentation implies resolver.jar needs to be in the system classpath, but I
can't see where this should be set.  As far as I can tell I haven't got one - the <xslt>
does have a <classpath> child but that doesn't seem to do it.

I hope someone can clarify all this.



Richard Kerry
BNCS Engineer
T: +44 (0)20 82259063
M: +44 (0)7812 325518
Room EBX 301, BBC Television Centre, Wood Lane, London, W12 7RJ<><>
This e-mail and the documents attached are confidential and intended solely for the addressee;
it may also be privileged. If you receive this e-mail in error, please notify the sender immediately
and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability
cannot be triggered for the message content. Although the sender endeavours to maintain a
computer virus-free network, the sender does not warrant that this transmission is virus-free
and will not be liable
From: Jan Matèrne (jhm) []
Sent: 14 August 2013 20:56
To: 'Ant Users List'
Subject: AW: Use of XML Catalog with Ant (xslt task) - request for example

>From Ants test directory:

snippet from the buildfile

  <xmlcatalog id="xdocs.catalog">

   <dtd publicID="-//stevo//DTD doc 1.0//EN"



  <target name="testCatalog" depends="init">

    <xslt destdir="xml/out"




       <xmlcatalog refid="xdocs.catalog"/>


     <concat><fileset dir="xml/out" includes="**"/></concat>






<xsl:output method="text"/>

<xsl:template match="/">

  <xsl:value-of select="/doc/section"/>





  "-//stevo//DTD doc 1.0//EN"




  <section title="About">

  in the absence of technology, there is only marketing




Von: Kerry, Richard []
Gesendet: Mittwoch, 14. August 2013 17:03
Betreff: Use of XML Catalog with Ant (xslt task) - request for example

I’m trying to get DocBook WebHelp building working, which uses Ant to
control the various processes involved, in particular Xslt.

I would like to use Catalogs for resolving my XSL stylesheet locations, and
have thus far been unable to make this work.

I’ve tried to follow Ant’s documentation regarding the <xmlcatalog> element
but I can’t get it to work.  (I am finding the Ant documentation in this
area extremely hard to follow)

By “can’t get it to work” I mean it doesn’t find the files I’m trying to
reference via the catalog.  It doesn’t show any messages indicating whether
or not it is using the resolver, so I presume it isn’t finding it.

Does anyone have any complete example of this working.

Ie one that includes a reference to the resolver jar, and the classpath, and
the catalog file and/or



Richard Kerry

BNCS Engineer, SI SOL Telco & Media Vertical Practice

T: +44 (0)20 822 59063[X]<thismessage:/Body.htm#>

M: +44 (0)7812 325518[X]<thismessage:/Body.htm#>

Lync: +44 (0) 20 3618[X]<thismessage:/Body.htm#> XXXX

Room G300, Stadium House, Wood Lane, London, W12 7TA


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message