xerces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwi...@apache.org
Subject cvs commit: xml-xerces/java/src/org/apache/xerces/jaxp DocumentBuilderImpl.java
Date Tue, 13 Feb 2001 02:14:18 GMT
edwingo     01/02/12 18:14:18

  Modified:    java/src/org/apache/xerces/jaxp DocumentBuilderImpl.java
  Log:
  Fix "namespaceAware" attribute
  
  Revision  Changes    Path
  1.7       +17 -15    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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DocumentBuilderImpl.java	2001/02/07 01:56:06	1.6
  +++ DocumentBuilderImpl.java	2001/02/13 02:14:18	1.7
  @@ -1,5 +1,5 @@
   /*
  - * $Id: DocumentBuilderImpl.java,v 1.6 2001/02/07 01:56:06 edwingo Exp $
  + * $Id: DocumentBuilderImpl.java,v 1.7 2001/02/13 02:14:18 edwingo Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -82,7 +82,7 @@
   /**
    * @author Rajiv Mordani
    * @author Edwin Goei
  - * @version $Revision: 1.6 $
  + * @version $Revision: 1.7 $
    */
   public class DocumentBuilderImpl extends DocumentBuilder {
       /** Xerces features */
  @@ -122,19 +122,21 @@
                   setErrorHandler(new DefaultValidationErrorHandler());
               }
   
  -            // XXX Ignore unimplemented features for now
  -            try {
  -                // Set various parameters obtained from DocumentBuilderFactory
  -                domParser.setFeature(XERCES_FEATURE_PREFIX +
  -                                     INCLUDE_IGNORABLE_WHITESPACE,
  -                                     !dbf.isIgnoringElementContentWhitespace());
  -                domParser.setFeature(XERCES_FEATURE_PREFIX +
  -                                     CREATE_ENTITY_REF_NODES_FEATURE,
  -                                     !dbf.isExpandEntityReferences());
  -                // XXX No way to control dbf.isIgnoringComments() or
  -                // dbf.isCoalescing()
  -            } catch (SAXException e) {
  -            }
  +            // "namespaceAware" ==  SAX Namespaces feature
  +            namespaceAware = dbf.isNamespaceAware();
  +            domParser.setFeature("http://xml.org/sax/features/namespaces",
  +                                 namespaceAware);
  +
  +            // Set various parameters obtained from DocumentBuilderFactory
  +            domParser.setFeature(XERCES_FEATURE_PREFIX +
  +                                 INCLUDE_IGNORABLE_WHITESPACE,
  +                                 !dbf.isIgnoringElementContentWhitespace());
  +            domParser.setFeature(XERCES_FEATURE_PREFIX +
  +                                 CREATE_ENTITY_REF_NODES_FEATURE,
  +                                 !dbf.isExpandEntityReferences());
  +
  +            // XXX No way to control dbf.isIgnoringComments() or
  +            // dbf.isCoalescing()
           } catch (SAXException e) {
               // Handles both SAXNotSupportedException, SAXNotRecognizedException
               throw new ParserConfigurationException(e.getMessage());
  
  
  

Mime
View raw message