You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2003/05/30 20:06:36 UTC
DO NOT REPLY [Bug 20365] New: -
validate against XML schema
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20365>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20365
validate against XML schema
Summary: validate against XML schema
Product: Xerces2-J
Version: 2.4.0
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: DOM
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: plumcore@hotmail.com
I use the setProperty method in my program to specify the location of the XML
schema, and I have turn on the 'validation feature' and the 'schema feature'.
But the validator does not work, and report the error:Cannot find the
declaration of element 'xxx'.
If I specify the location of the grammars within the XML instance document,the
XML schema document is located properly.
example:
DOMParser parser = new DOMParser();
try {
parser.setFeature("http://xml.org/sax/features/validation", true);
parser.setFeature("http://apache.org/xml/features/validation/schema", true);
parser.setProperty("http://apache.org/xml/properties/schema/external-
noNamespaceSchemaLocation","sample.xsd");
parser.parse("sample.xml");
...
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org