mrglavas 2004/07/09 15:12:33 Modified: java/src/org/apache/xerces/parsers DOMParserImpl.java Log: Fixing Jira Bug #950:
http://nagoya.apache.org/jira/browse/XERCESJ-950 Eliminating the check to see what the value of 'schema-type' is before setting schema-location is needed since the order in which they are set does not matter. schema-location should be "ignored" if schema-type has not been set, but it still must be allowed to be set. Patch thanks to Naela Nissar. Revision Changes Path 1.28 +3 -12 xml-xerces/java/src/org/apache/xerces/parsers/DOMParserImpl.java Index: DOMParserImpl.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/DOMParserImpl.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- DOMParserImpl.java 9 Jul 2004 21:38:58 -0000 1.27 +++ DOMParserImpl.java 9 Jul 2004 22:12:33 -0000 1.28 @@ -473,11 +473,12 @@ if (value instanceof String || value == null) { try { if (value == null) { + fSchemaLocation = null; fConfiguration.setProperty ( Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_SOURCE, null); } - else if (fSchemaType == Constants.NS_XMLSCHEMA) { + else { fSchemaLocation = (String)value; // map DOM schema-location to JAXP schemaSource property // tokenize location string @@ -498,16 +499,6 @@ value); } } - else { - // REVISIT: allow pre-parsing DTD grammars - String msg = - DOMMessageFormatter.formatMessage ( - DOMMessageFormatter.DOM_DOMAIN, - "FEATURE_NOT_SUPPORTED", - new Object[] { name }); - throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); - } - } catch (XMLConfigurationException e) {} } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]