ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Susanne Wunsch <apache-...@uriah.heep.sax.de>
Subject xmlvalidate with xmlcatalog
Date Mon, 10 May 2010 19:33:59 GMT
Hello,

I try to use xmlcatalog within xmlvalidate, but ANT doesn't find a
resolver. I looked into the manual, but didn't find any idea for a
proper classpath in my environment. Any help would be appreciated.

I use Apache Ant version 1.7.1 at FreeBSD 8.0

-- Debug messages ------------------------------------------------

resolveEntity: 'null': 'file:/home/filename.xsd'
Apache resolver library not found, internal resolver will be used
Failed to load Apache resolver: java.lang.NoClassDefFoundError: org/apache/xml/resolver/tools/CatalogResolver
No matching catalog entry found, parser will use: 'file:/home/filename.xsd'

-- Ant task ------------------------------------------------------

<xmlvalidate file="filename.xml" failonerror="false"
  classname="org.apache.xerces.parsers.SAXParser">
  <xmlcatalog>
     <classpath>
       <pathelement 
         location="/usr/local/share/java/apache-ant/lib/ant-apache-resolver.jar"/>
     </classpath>
     <entity publicId="http://purl.org/dc/elements/1.1/"
       location="../DC/dc.xsd"/>
  </xmlcatalog>
  <attribute name="http://xml.org/sax/features/validation" value="true"/>
  <attribute name="http://apache.org/xml/features/validation/schema" 
    value="true"/>
  <attribute name="http://xml.org/sax/features/namespaces" value="true"/>
  <attribute name="http://xml.org/sax/features/namespace-prefixes" 
    value="true"/>
</xmlvalidate>
-------------------------------------------------------------------

'location' inside <entity> is a relative path to the projects 'baseDir'.

Thanks for any hints.

read you ...
Susanne 

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


Mime
View raw message