ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Matèrne (jhm) <apa...@materne.de>
Subject AW: Use of XML Catalog with Ant (xslt task) - request for example
Date Wed, 14 Aug 2013 19:56:31 GMT
>From Ants test directory:

 

snippet from the buildfile

  <xmlcatalog id="xdocs.catalog">

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

     location="xml/doc.dtd"/>

  </xmlcatalog>  

  

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

    <xslt destdir="xml/out"

           includes="xml/about.xml"

           extension=".txt"

           style="xml/doc.xsl">

       <xmlcatalog refid="xdocs.catalog"/>

     </xslt>

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

  </target>

 

 

xsl

 

<xsl:stylesheet 

    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

    version="1.0">

 

<xsl:output method="text"/>

 

<xsl:template match="/">

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

</xsl:template> 

 

</xsl:stylesheet>

 

 

xml

 

<!DOCTYPE doc PUBLIC

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

  "http://chemical/brothers"

  >

<doc>

  <section title="About">

  in the absence of technology, there is only marketing

  </section>

</doc>

 

 

 

Jan

 

 

 

 

Von: Kerry, Richard [mailto:richard.kerry@atos.net] 
Gesendet: Mittwoch, 14. August 2013 17:03
An: user@ant.apache.org
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 catalogManager.properties.

 

 

Appreciatively,

Richard.

 

 

 

 



Richard Kerry

BNCS Engineer, SI SOL Telco & Media Vertical Practice

 

T: +44 (0)20 822 59063 

M: +44 (0)7812 325518

Lync: +44 (0) 20 3618 XXXX

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

 <mailto:richard.kerry@atos.net> richard.kerry@atos.net

 



 

 

 

 


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