ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Aston" <>
Subject RE: xmlvalidate task and external catalogs
Date Wed, 07 Apr 2004 08:56:52 GMT
Ok then...

my build target now looks like this...

<target name="validate" description="Validate structure files">

		<attribute name=""

my build command is...

ant -v -lib d:\java\xml-commons-resolver-1.1\resolver.jar validate

the output is...

Apache Ant version 1.6.1 compiled on March 3 2004
Buildfile: build.xml
Detected Java version: 1.4 in: d:\java\j2SDK1.4.2_03\jre
Detected OS: Windows XP
parsing buildfile D:\sandbox\realms\realmsSample\build.xml with URI =
Project base dir set to: D:\sandbox\realms\realmsSample
Build sequence for target `validate' is [validate]
Complete build sequence is [validate, publish-all, val, ]

[xmlvalidate] Using SAX2 reader org.apache.xerces.parsers.SAXParser
[xmlvalidate] Validating structure.xml...
Apache resolver library not found, internal resolver will be used
Warning: catalogpath listing external catalogs will be ignored
ml:7:130: cvc-elt.1: Cannot find the declaration of element 'manifest'.
l is not a valid XML document
[xmlvalidate] 1 file(s) have been successfully validated.

Interestingly enough, (but probably a btw) if I do a -diagnostics it tells
me that...

 XML Parser information
XML Parser : org.apache.xerces.jaxp.SAXParserImpl
XML Parser Location: D:\java\apache-ant-1.6.1\lib\xercesImpl.jar

which means it is not using the jar specified in the xmlvalidate task.

Could anything in the xml or catalog files be screwing things up or is it
obvious that the catalog is not even being resolved?



-----Original Message-----
From: Stefan Bodewig []
Sent: 07 April 2004 09:20
Subject: Re: xmlvalidate task and external catalogs

On Tue, 6 Apr 2004, Jeremy Aston <> wrote:

> I beleive the declarations to be correct but I could quite easily be
> wrong!

Could you try a few things, please:

(1) Move your catalog definition into the task.  There have been bugs
with using <xmlcatalog refid="..."/> and I'm not convinced that we've
fixed all of them.

(2) Move the resolver jar into ANT_HOME/lib - or simply use
ant -lib path/to/resolver.jar - so that it ends up on Ant's default
CLASSPATH.  I don't think that the nested <classpath> of <xmlvalidate>
will be used to look up the resolver.  In particular in combination
with (1) I'm almost sure that the classpath doesn't have any effect
since the resolver will be searched for in your <xmlcatalog>
definition that doesn't ever see you <classpath>.


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message