Hello,

polymorphisme <webmas...@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-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to