It took me a long time to experiment with this. Here is the result: Property 'org.apache.xerces.xni.parser.XMLParserConfiguration' is not recognized. Any idea how to enable the caching feature through the ANT interface? Adrian.
James Abley wrote: > Try turning on grammar caching. > > http://xml.apache.org/xerces2-j/faq-grammars.html#faq-4 > > I would imagine by doing something like this: > > <attribute name="org.apache.xerces.xni.parser.XMLParserConfiguration" > value="org.apache.xerces.parsers.XMLGrammarCachingConfiguration" /> > > or: > > <property name="org.apache.xerces.xni.parser.XMLParserConfiguration" > value="org.apache.xerces.parsers.XMLGrammarCachingConfiguration" /> > > Cheers, > > James > > 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: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]