? gnu/xml/validation/relaxng ? gnu/xml/validation/xmlschema Index: gnu/xml/dom/DomDocumentBuilderFactory.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/xml/dom/DomDocumentBuilderFactory.java,v retrieving revision 1.2 diff -u -r1.2 DomDocumentBuilderFactory.java --- gnu/xml/dom/DomDocumentBuilderFactory.java 2 Jul 2005 20:32:15 -0000 1.2 +++ gnu/xml/dom/DomDocumentBuilderFactory.java 23 Feb 2006 20:04:08 -0000 @@ -37,6 +37,7 @@ package gnu.xml.dom; +import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.FactoryConfigurationError; @@ -59,6 +60,7 @@ final DOMImplementation impl; final DOMImplementationLS ls; + private boolean secureProcessing; public DomDocumentBuilderFactory() { @@ -124,5 +126,26 @@ // TODO } + public void setFeature(String name, boolean value) + throws ParserConfigurationException + { + if (name == null) + throw new NullPointerException(); + if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(name)) + { + secureProcessing = true; + return; + } + throw new ParserConfigurationException(name); + } + + public boolean getFeature(String name) + throws ParserConfigurationException + { + if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(name)) + return secureProcessing; + throw new ParserConfigurationException(name); + } + } Index: gnu/xml/dom/JAXPFactory.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/xml/dom/JAXPFactory.java,v retrieving revision 1.3 diff -u -r1.3 JAXPFactory.java --- gnu/xml/dom/JAXPFactory.java 2 Jul 2005 20:32:15 -0000 1.3 +++ gnu/xml/dom/JAXPFactory.java 23 Feb 2006 20:04:08 -0000 @@ -49,6 +49,7 @@ import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; +import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; @@ -70,6 +71,7 @@ private static final String FEATURE = "http://xml.org/sax/features/"; private SAXParserFactory pf; + private boolean secureProcessing; /** * Default constructor. @@ -138,6 +140,27 @@ throw new IllegalArgumentException(name); } + public void setFeature(String name, boolean value) + throws ParserConfigurationException + { + if (name == null) + throw new NullPointerException(); + if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(name)) + { + secureProcessing = true; + return; + } + throw new ParserConfigurationException(name); + } + + public boolean getFeature(String name) + throws ParserConfigurationException + { + if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(name)) + return secureProcessing; + throw new ParserConfigurationException(name); + } + static final class JAXPBuilder extends DocumentBuilder implements ErrorHandler Index: gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java,v retrieving revision 1.2 diff -u -r1.2 GnomeDocumentBuilderFactory.java --- gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java 2 Jul 2005 20:32:16 -0000 1.2 +++ gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java 23 Feb 2006 20:04:08 -0000 @@ -37,6 +37,7 @@ package gnu.xml.libxmlj.dom; +import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; @@ -47,9 +48,11 @@ * @author Chris Burdess */ public class GnomeDocumentBuilderFactory -extends DocumentBuilderFactory + extends DocumentBuilderFactory { + private boolean secureProcessing; + public GnomeDocumentBuilderFactory () { setNamespaceAware (true); @@ -91,4 +94,25 @@ // TODO } + public void setFeature(String name, boolean value) + throws ParserConfigurationException + { + if (name == null) + throw new NullPointerException(); + if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(name)) + { + secureProcessing = true; + return; + } + throw new ParserConfigurationException(name); + } + + public boolean getFeature(String name) + throws ParserConfigurationException + { + if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(name)) + return secureProcessing; + throw new ParserConfigurationException(name); + } + } Index: javax/xml/parsers/DocumentBuilderFactory.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/xml/parsers/DocumentBuilderFactory.java,v retrieving revision 1.4 diff -u -r1.4 DocumentBuilderFactory.java --- javax/xml/parsers/DocumentBuilderFactory.java 2 Jul 2005 20:32:52 -0000 1.4 +++ javax/xml/parsers/DocumentBuilderFactory.java 23 Feb 2006 20:04:08 -0000 @@ -309,6 +309,7 @@ /** * Returns the schema. * @see #setSchema + * @since 1.5 */ public Schema getSchema() { @@ -318,6 +319,7 @@ /** * Sets the schema. * @see #getSchema + * @since 1.5 */ public void setSchema(Schema schema) { @@ -327,7 +329,7 @@ /** * Indicates whether parsers obtained from this factory will be XInclude * aware. - * @since 1.3 + * @since 1.5 */ public boolean isXIncludeAware() { @@ -336,11 +338,32 @@ /** * Sets whether parsers obtained from this factory will be XInclude aware. - * @since 1.3 + * @since 1.5 */ public void setXIncludeAware(boolean state) { xIncludeAware = state; } + + /** + * Sets the value of the specified feature. + * @param name the feature name (URI) + * @param value whether to enable the feature or not + * @exception ParserConfigurationException if the feature is not + * supported. + * @since 1.5 + */ + public abstract void setFeature(String name, boolean value) + throws ParserConfigurationException; + + /** + * Returns the value of the specified feature. + * @param name the feature name (URI) + * @exception ParserConfigurationException if the feature is not + * supported. + * @since 1.5 + */ + public abstract boolean getFeature(String name) + throws ParserConfigurationException; }