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 Re: xmlvalidate with xmlcatalog
Date Tue, 11 May 2010 05:57:43 GMT
Stefan Bodewig <bodewig@apache.org> writes:

> On 2010-05-10, Susanne Wunsch <apache-ant@uriah.heep.sax.de> wrote:
>
>> 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.
>
> Ant's distribution doesn't contain the XML resolver itself, only the
> bridge code needed to use one.  In addition to ant-apache-resolver.jar
> you also need the resolver library of Apache XML Commons
> <http://xml.apache.org/commons/components/resolver/>

Thanks for the link. Now the resolver is loaded, but the catalog
entities doesn't really fit.

How to use catalog entity with XML Schema?

I tried 'namespace' and 'schemaLocation' as PublicId, but it didn't
work.

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

Class org.apache.tools.ant.types.resolver.ApacheCatalogResolver loaded from parent loader
(parentFirst)
Apache resolver library found, xml-commons resolver will be used
Using catalogpath ''
...
resolveEntity: 'null': 'http://dublincore.org/schemas/xmls/qdc/2008/02/11/dc.xsd'
No matching catalog entry found, parser will use: 'http://dublincore.org/schemas/xmls/qdc/2008/02/11/dc.xsd'

-- ANT task -------------------------------------------------------

<xmlvalidate file="${xml-file}.xml" 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://dublincore.org/schemas/xmls/qdc/2008/02/11/dc.xsd"
      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>

--------------------------------------------------------------------

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