Author: veithen
Date: Sat Oct 29 19:05:38 2011
New Revision: 1194976
URL: http://svn.apache.org/viewvc?rev=1194976&view=rev
Log:
Store the Schema object in DOOMDocumentBuilderFactory (as in the deprecated
DocumentBuilderFactoryImpl; required for interop with OpenSAML).
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilder.java
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilderFactory.java
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilder.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilder.java?rev=1194976&r1=1194975&r2=1194976&view=diff
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilder.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilder.java
Sat Oct 29 19:05:38 2011
@@ -34,13 +34,18 @@ import org.xml.sax.SAXException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
+import javax.xml.validation.Schema;
+
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
public class DOOMDocumentBuilder extends DocumentBuilder {
- protected DOOMDocumentBuilder() {
+ private final Schema schema;
+
+ DOOMDocumentBuilder(Schema schema) {
+ this.schema = schema;
}
/**
@@ -63,6 +68,10 @@ public class DOOMDocumentBuilder extends
return true;
}
+ public Schema getSchema() {
+ return schema;
+ }
+
public DOMImplementation getDOMImplementation() {
return new DOMImplementationImpl();
}
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilderFactory.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilderFactory.java?rev=1194976&r1=1194975&r2=1194976&view=diff
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilderFactory.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/jaxp/DOOMDocumentBuilderFactory.java
Sat Oct 29 19:05:38 2011
@@ -22,14 +22,17 @@ package org.apache.axiom.om.impl.dom.jax
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.validation.Schema;
/**
* Document builder factory that conforms to JAXP.
*/
public class DOOMDocumentBuilderFactory extends DocumentBuilderFactory {
+ private Schema schema;
+
public DocumentBuilder newDocumentBuilder()
throws ParserConfigurationException {
- return new DOOMDocumentBuilder();
+ return new DOOMDocumentBuilder(schema);
}
public Object getAttribute(String arg0) throws IllegalArgumentException {
@@ -52,4 +55,12 @@ public class DOOMDocumentBuilderFactory
// TODO TODO
throw new UnsupportedOperationException("TODO");
}
+
+ public Schema getSchema() {
+ return schema;
+ }
+
+ public void setSchema(Schema schema) {
+ this.schema = schema;
+ }
}