--- old/src/com/sun/org/apache/xerces/internal/parsers/SAXParser.java Mon Jul 8 17:50:02 2013 +++ new/src/com/sun/org/apache/xerces/internal/parsers/SAXParser.java Mon Jul 8 17:50:02 2013 @@ -22,8 +22,11 @@ import com.sun.org.apache.xerces.internal.impl.Constants; import com.sun.org.apache.xerces.internal.util.SymbolTable; +import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration; +import org.xml.sax.SAXNotRecognizedException; +import org.xml.sax.SAXNotSupportedException; /** * This is the main Xerces SAX parser class. It uses the abstract SAX @@ -120,4 +123,24 @@ } // (SymbolTable,XMLGrammarPool) + /** + * Sets the particular property in the underlying implementation of + * org.xml.sax.XMLReader. + */ + public void setProperty(String name, Object value) + throws SAXNotRecognizedException, SAXNotSupportedException { + XMLSecurityPropertyManager spm = new XMLSecurityPropertyManager(); + int index = spm.getIndex(name); + if (index > -1) { + /** + * this is a direct call to this parser, not a subclass since + * internally the support of this property is done through + * XMLSecurityPropertyManager + */ + spm.setValue(index, XMLSecurityPropertyManager.State.APIPROPERTY, (String)value); + super.setProperty(Constants.XML_SECURITY_PROPERTY_MANAGER, spm); + } else { + super.setProperty(name, value); + } + } } // class SAXParser