No, the example does not work: Valid documents must have a <!DOCTYPE
declaration.
My XML uses an xsd schema, not DTD, so <!DOCTYPE does not apply.
Adding:
<attribute name="http://apache.org/xml/features/validation/schema"
value="true"/>
causes a different error:
BUILD FAILED: C:\GIROUX\JOnAS\TCK_DD_Porting_Tool\build.xml:105: Parser
org.apache.crimson.parser.XMLReaderImpl doesn't recognize feature
http://apache.org/xml/features/validation/schema
Michael Giroux
Andy Clark <[EMAIL PROTECTED]>
05/26/2004 03:03 PM
Please respond to xerces-j-user
To: [EMAIL PROTECTED]
cc:
Subject: Re: How to validate XML using XSD schema with Apache ANT
[EMAIL PROTECTED] wrote:
> FWIW, I've asked this question in the ANT user list, but it seems that
> nobody over there knows how to do this either. I'm pretty convinced
this
> is an XERCES related question.
>
> If I cannot get an ANT <xmlvalidate> specific reply, I will be glad to
> take a reply that points me to a sample java application that validates
> xml using a schema.
So the following doesn't work?
<xmlvalidate failonerror="yes" lenient="no" warn="yes">
<fileset dir="xml" includes="**/*.xml"/>
<attribute name="http://xml.org/sax/features/validation"
value="true"/>
</xmlvalidate>
This was taken directly from the Ant documentation for the
XmlValidate task.
--
Andy Clark * [EMAIL PROTECTED]
---------------------------------------------------------------------
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]