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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to