ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prashant <prash...@pramati.com>
Subject Re: xmlvalidate with remote schemas
Date Tue, 26 Sep 2006 05:03:55 GMT
<snip>
 >And it takes it a very long time to complete (almost ten minutes for
 > 70-80 XML files).
</snip>

Could't you use <xmlcatlog> to locate the XSD schemas locally instead of 
http download, which perhaps is taking time.

-Prashant
Adrian Herscu wrote:
> Hi all,
>
> I am using the <xmlvalidate> task in a Maven Ant mojo that validates XML
> files against XSD schemas.
>
> <xmlvalidate>
>   <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"/>
>
>   <fileset dir="${sourceDirectory}">
>     <include name="**/*.xml" />
>   </fileset>
>
> </xmlvalidate>
>
>
> Everything was working fine until I moved those schemas to SourceForge.
> Now the task fails erratically with this kind of errors:
>
> [xmlvalidate] D:\mypath\myfile.xml:8:353: schema_reference.4: Failed to
> read schema document http://mydomain/schemas/myschema.xsd', because 1)
> could not find the document; 2) the document could not be read; 3) the
> root element of the document is not <xsd:schema>.
> [xmlvalidate] D:\mypath\myfile.xml:8:353: cvc-elt.1: Cannot find the
> declaration of element 'myrootelement'.
>
> ...and sometimes with:
>
> [xmlvalidate] http://mydomain/schemas/myschema.xsd:29:90:
> schema_reference.4: Failed to read schema document 'someimported.xsd',
> because 1) could not find the document; 2) the document could not be
> read; 3) the root element of the document is not <xsd:schema>.
>
> And it takes it a very long time to complete (almost ten minutes for
> 70-80 XML files).
>
> I tried to validate these files with MSXML4.0 and MSV and they validate.
>
> Any suggestions? Timeouts?
>
> Adrian.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>   


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


Mime
View raw message