Yes, you need to set "http://apache.org/xml/features/validation/schema" to
true. It means validate against a schema, not validate a schema.
HTH,
Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255
[EMAIL PROTECTED]
Giana Marco
<[EMAIL PROTECTED] To: "Xerces-J-User
(E-Mail)" <[EMAIL PROTECTED]>
.co.at> cc:
Subject: XML Parser settings
08/04/2003 08:33
AM
Please respond to
xerces-j-user
Hi,
I have just started using Xerces. I just need some clarification on what is
happening.
I am trying to validate an XML file against an XSD. Now the XSD is
referenced in the XML as xsi:noNamespaceSchemaLocation,
and is located in the same directory as the XML.
I set to false http://apache.org/xml/features/validation/schema and
http://apache.org/xml/features/validation/schema-full-checking
as I did not want to validate the XSD, but
http://xml.org/sax/features/validation was set to true, as to validate the
XML against the XSD.
Now I receive the following error when I go to pass the XML.
Error: Document is invalid: no grammar found.
LineNumber: 4
ColumnNumber: 13
PublicID: null
SystemID: file:///<pathToXmlDoc>/tufes6060WebCityConfig.xml
>From what I understand this is a DTD validation error, which is answered in
the FAQ,
"How can I tell the parser to validate against XML Schema and not to report
DTD validation errors?"
Therefore I need to set http://apache.org/xml/features/validation/schema to
true to be able to parse a correct XML
document against an XSD without getting an errors reported.
Is this correct ?
Regards
Marco Giana
---------------------------------------------------------------------
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]