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: Ant 1.8.2 schemavalidate and xmlcatalog
Date Mon, 21 May 2012 11:59:44 GMT
Hello,

polymorphisme <webmaster@polymorphisme.org> writes:

>  I try to use the task schemavalidate with xmlcatalog like this :
>
> <schemavalidate 
>   classname="org.apache.xerces.parsers.SAXParser" 
>   classpathref="${lib.dir}/xercesImpl-2.7.1.jar"		 	    	    				  
>    disableDTD="false" fullchecking="true"				    	      
>   file="${etc.dir}/xml-xsd-valid.xml">			  		  	
>    <xmlcatalog refid="catalogs"/>  								 
> </schemavalidate>

[snip ant output]

> Otherwise, at page http://ant.apache.org/manual/Tasks/schemavalidate.html,
> we can read :
> This task supports the use of nested
> <xmlcatalog> elements

Sorry, I don't have any experiences with real XML catalogs following the
OASIS definition. I embedded the catalog definition in the ant syntax
and that works fine for me.

<schemavalidate failonerror="true">
  <fileset dir="${sample.dir}">
    <include name="*.xml"/>
  </fileset>
  <schema namespace="http://purl.org/dc/elements/1.1/"
    file="/Users/susi/Documents/workspace/W3-OASIS/DC/dc.xsd"/>
  <schema namespace="http://www.w3.org/XML/1998/namespace"
    file="/Users/susi/Documents/workspace/W3-OASIS/xml.xsd"/>
  <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"/>
</schemavalidate>

Maybe it helps...

Kind regards...
Susanne

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


Mime
View raw message