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 2002/09/26 22:07:19 UTC
DO NOT REPLY [Bug 13044] New: -
DOMParser features do not have any effect
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=13044>.
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=13044
DOMParser features do not have any effect
Summary: DOMParser features do not have any effect
Product: Xerces2-J
Version: 2.1.0
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: DOM
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: cmontpetit@nertec.com
This behavior has changed between 2.1.0 and the build of sept 25.
Setting the following property on the DOMParser has no effect:
parser.setProperty("http://apache.org/xml/properties/schema/external-
noNamespaceSchemaLocation", "mySchema.xsd");
The following code use to work as expected:
org.apache.xerces.parsers.DOMParser parser = new
org.apache.xerces.parsers.DOMParser();
parser.setFeature("http://xml.org/sax/features/namespaces", true);
parser.setFeature("http://xml.org/sax/features/validation", true);
parser.setFeature("http://apache.org/xml/features/validation/schema",
true);
parser.setFeature("http://apache.org/xml/features/validation/schema-full-
checking", true);
parser.setProperty("http://apache.org/xml/properties/schema/external-
noNamespaceSchemaLocation", schema);
InputSource in = new InputSource(xmlFile);
parser.parse(in);
That is, the document was using the schema specified in the property.
Now, the specified schema is never used.
Also, since after 2.1.0, this feature set requires that the xml file contains
xmlns declaration with the noNamespaceSchemaLocation attribute:
<test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="test1.xsd">
The schema must exist otherwise a failure occurs and the schema specified as a
parser feature cannot override this one (anymore).
I am not sure if this really a bug or changes made to comply to the spec.
Claude
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org