You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ne...@apache.org on 2003/01/11 01:20:51 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/jaxp SAXParserImpl.java DocumentBuilderImpl.java

neilg       2003/01/10 16:20:51

  Modified:    java/src/org/apache/xerces/jaxp SAXParserImpl.java
                        DocumentBuilderImpl.java
  Log:
  fix JAXP 1.2 limitation where DTD errors would be emitted if a DTD were present, even if the schemaLanguage property was set appropriately.  Now no errors will be emitted under this condition.
  
  Revision  Changes    Path
  1.18      +4 -1      xml-xerces/java/src/org/apache/xerces/jaxp/SAXParserImpl.java
  
  Index: SAXParserImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/jaxp/SAXParserImpl.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- SAXParserImpl.java	9 Aug 2002 15:18:19 -0000	1.17
  +++ SAXParserImpl.java	11 Jan 2003 00:20:50 -0000	1.18
  @@ -193,6 +193,9 @@
                   xmlReader.setFeature(Constants.XERCES_FEATURE_PREFIX +
                                        Constants.SCHEMA_VALIDATION_FEATURE,
                                        true);
  +                // this will allow the parser not to emit DTD-related
  +                // errors, as the spec demands
  +                xmlReader.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
               } else if (value == null) {
                   schemaLanguage = null;
                   xmlReader.setFeature(Constants.XERCES_FEATURE_PREFIX +
  
  
  
  1.19      +4 -1      xml-xerces/java/src/org/apache/xerces/jaxp/DocumentBuilderImpl.java
  
  Index: DocumentBuilderImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/jaxp/DocumentBuilderImpl.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- DocumentBuilderImpl.java	9 Aug 2002 15:18:19 -0000	1.18
  +++ DocumentBuilderImpl.java	11 Jan 2003 00:20:50 -0000	1.19
  @@ -163,6 +163,9 @@
                           domParser.setFeature(
                               Constants.XERCES_FEATURE_PREFIX +
                               Constants.SCHEMA_VALIDATION_FEATURE, true);
  +                        // this should allow us not to emit DTD errors, as expected by the 
  +                        // spec when schema validation is enabled
  +                        domParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
                       }
                   } else {
                       // Let Xerces code handle the property
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org