Stefan Bodewig <[email protected]> writes: > On 2010-05-10, Susanne Wunsch <[email protected]> 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: [email protected] For additional commands, e-mail: [email protected]
