jaxp/src/com/sun/org/apache/xerces/internal/parsers/DOMParser.java
changeset 18890 25bdeca3173b
parent 12458 d601e4bba306
child 20973 cc1cc8eb501b
equal deleted inserted replaced
18675:711eb4aa87de 18890:25bdeca3173b
    27 import com.sun.org.apache.xerces.internal.util.EntityResolver2Wrapper;
    27 import com.sun.org.apache.xerces.internal.util.EntityResolver2Wrapper;
    28 import com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper;
    28 import com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper;
    29 import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter;
    29 import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter;
    30 import com.sun.org.apache.xerces.internal.util.Status;
    30 import com.sun.org.apache.xerces.internal.util.Status;
    31 import com.sun.org.apache.xerces.internal.util.SymbolTable;
    31 import com.sun.org.apache.xerces.internal.util.SymbolTable;
       
    32 import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager;
    32 import com.sun.org.apache.xerces.internal.xni.XNIException;
    33 import com.sun.org.apache.xerces.internal.xni.XNIException;
    33 import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool;
    34 import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool;
    34 import com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException;
    35 import com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException;
    35 import com.sun.org.apache.xerces.internal.xni.parser.XMLEntityResolver;
    36 import com.sun.org.apache.xerces.internal.xni.parser.XMLEntityResolver;
    36 import com.sun.org.apache.xerces.internal.xni.parser.XMLErrorHandler;
    37 import com.sun.org.apache.xerces.internal.xni.parser.XMLErrorHandler;
    72         Constants.SAX_FEATURE_PREFIX + Constants.USE_ENTITY_RESOLVER2_FEATURE;
    73         Constants.SAX_FEATURE_PREFIX + Constants.USE_ENTITY_RESOLVER2_FEATURE;
    73 
    74 
    74     protected static final String REPORT_WHITESPACE =
    75     protected static final String REPORT_WHITESPACE =
    75             Constants.SUN_SCHEMA_FEATURE_PREFIX + Constants.SUN_REPORT_IGNORED_ELEMENT_CONTENT_WHITESPACE;
    76             Constants.SUN_SCHEMA_FEATURE_PREFIX + Constants.SUN_REPORT_IGNORED_ELEMENT_CONTENT_WHITESPACE;
    76 
    77 
       
    78     /** Property identifier: Security property manager. */
       
    79     private static final String XML_SECURITY_PROPERTY_MANAGER =
       
    80             Constants.XML_SECURITY_PROPERTY_MANAGER;
       
    81 
    77     // recognized features:
    82     // recognized features:
    78     private static final String[] RECOGNIZED_FEATURES = {
    83     private static final String[] RECOGNIZED_FEATURES = {
    79         REPORT_WHITESPACE
    84         REPORT_WHITESPACE
    80     };
    85     };
    81 
    86 
   577            return (fCurrentNode!=null &&
   582            return (fCurrentNode!=null &&
   578                    fCurrentNode.getNodeType() == Node.ELEMENT_NODE)? fCurrentNode:null;
   583                    fCurrentNode.getNodeType() == Node.ELEMENT_NODE)? fCurrentNode:null;
   579        }
   584        }
   580 
   585 
   581         try {
   586         try {
       
   587             XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager)
       
   588                     fConfiguration.getProperty(XML_SECURITY_PROPERTY_MANAGER);
       
   589             int index = spm.getIndex(propertyId);
       
   590             if (index > -1) {
       
   591                 return spm.getValueByIndex(index);
       
   592             }
       
   593 
   582             return fConfiguration.getProperty(propertyId);
   594             return fConfiguration.getProperty(propertyId);
   583         }
   595         }
   584         catch (XMLConfigurationException e) {
   596         catch (XMLConfigurationException e) {
   585             String identifier = e.getIdentifier();
   597             String identifier = e.getIdentifier();
   586             if (e.getType() == Status.NOT_RECOGNIZED) {
   598             if (e.getType() == Status.NOT_RECOGNIZED) {