ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Aston" <...@realitylogic.com>
Subject RE: xmlcatalog example for schema
Date Tue, 25 May 2004 18:18:20 GMT
Hi Michael,

I dunno if this got ansered yet but there was a recent thread on this
because I had a problem with it too.  Follow the thread backwards from here:
http://marc.theaimsgroup.com/?l=ant-user&m=108137857107011&w=2

There are a couple of things I found really helpful.  Firstly make sure the
resolver libs are there.  If you are using your own build of Ant as I was
then you need resolver.jar in your lib folder when you do a build so that
the dist includes it and the ant-resolver classes are properly built.  Also
I found the only real way of getting the catalog in the path was to do an
inline path reference e.g.:

<xslt in="infile.xml"
      style="style.xsl"
      out="outfile.xml">
    <xmlcatalog>
        <catalogpath>
            <pathelement location="/path/to/some/catalog.xml"/>
        </catalogpath>
    </xmlcatalog>
</xslt>

Of course you can use properties for your paths to files etc.  I have run
this on XP and Mac OS X with J1.4 built in Xalan and it works fine.

Hope this helps!

Jeremy



-----Original Message-----
From: michael.giroux@objectweb.org [mailto:michael.giroux@objectweb.org]
Sent: 17 May 2004 16:33
To: user@ant.apache.org
Subject: xmlcatalog example for schema


Does anyone have a working example of using xmlcatalog with an xmlvalidate
task?

I have searched the ANT docs, and every xmlcatalog related bit of info I
can find on the web, but I don't seem to be able to get xmlvalidate to
accept my document.

I'm using Ant 1.6.1.  I'm trying to construct a target that generates an
XML file, then uses xmlvalidate to make sure it is correctly generated.
I'm starting with some known valid xml files trying to get the xmlvalidate
to run without errors, but so far, I keep getting an error from the
validation.  I am not getting any complaints about the xmlcatalog, so it
is not obvious if it is specified correctly and not being used, or it is
specified incorrectly, and hence, not matching as I expect it to.

Thanks
Michael Giroux



I'm trying to use the following task:

<xmlvalidate failonerror="no" lenient="no" warn="yes"
 file='${dist.dir}/jonas-${j2ee.dd}'>
<attribute name="http://xml.org/sax/features/validation" value="true"/>
<attribute name="http://apache.org/xml/features/validation/schema"
value="true"/>
<xmlcatalog>
 <catalogpath>
   <pathelement location="${basedir}/xmlcatalog.xml"/>
 </catalogpath>
</xmlcatalog>
</xmlvalidate>

xmlcatalog.xml is:
<?xml version="1.0" encoding="UFT-8"?>
<catalog>
  <rewriteSystem systemIdStartString="http://www.objectweb.org/jonas/ns"

rewritePrefix="file:///C:/GIROUX/JOnAS/TCK_DD_Porting_Tool/JOnAS_XSD_Modifie
d"
    />
</catalog>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message