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: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
