John Mani wrote:-
> I am parsing a xml document whose schema is defined in another document.
>
> I create a DOMParser, and set the following features/properties:
>
> parser.setFeature("http://apache.org/xml/features/validation/schema",
> true);
> parser.setFeature("http://xml.org/sax/features/validation", true);
> parser.setProperty(
>
> "http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",
> "myschema.xsd");
>
> However I get the following exception when running the program:
> org.xml.SAXNotRecogonizedException:
> http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation
> Bug ? I don't think I misspelt anything ...Yep, you are correct. Please use the attached modified file (.java) and build the jar(s) again. It should solve your problem. Gopal -----
StandardParserConfiguration.java
Description: StandardParserConfiguration.java
Index: StandardParserConfiguration.java
===================================================================
RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/parsers/StandardParserConfiguration.java,v
retrieving revision 1.10
diff -w -u -r1.10 StandardParserConfiguration.java
--- StandardParserConfiguration.java 2001/12/14 20:50:21 1.10
+++ StandardParserConfiguration.java 2001/12/25 15:58:32
@@ -773,6 +773,12 @@
if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
String property =
propertyId.substring(Constants.XERCES_PROPERTY_PREFIX.length());
if (property.equals(Constants.DTD_SCANNER_PROPERTY)) {
+ return;
+ }
+ if (property.equals(Constants.SCHEMA_LOCATION)) {
+ return;
+ }
+ if (property.equals(Constants.SCHEMA_NONS_LOCATION)) {
return;
}
}
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
