Author: jochen
Date: Fri Aug 11 04:59:58 2006
New Revision: 430769
URL: http://svn.apache.org/viewvc?rev=430769&view=rev
Log:
Removed a Xerces dependency.
Modified:
webservices/commons/trunk/modules/XmlSchema/test/tests/w3c/TestW3CSchemaTestSet.java
Modified:
webservices/commons/trunk/modules/XmlSchema/test/tests/w3c/TestW3CSchemaTestSet.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/test/tests/w3c/TestW3CSchemaTestSet.java?rev=430769&r1=430768&r2=430769&view=diff
==============================================================================
---
webservices/commons/trunk/modules/XmlSchema/test/tests/w3c/TestW3CSchemaTestSet.java
(original)
+++
webservices/commons/trunk/modules/XmlSchema/test/tests/w3c/TestW3CSchemaTestSet.java
Fri Aug 11 04:59:58 2006
@@ -21,10 +21,12 @@
import java.util.List;
import java.util.ListIterator;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.apache.xerces.parsers.DOMParser;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -32,6 +34,10 @@
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
+import tests.w3c.SchemaTest;
+import tests.w3c.TestRoundTripXSD;
+
+
/**
* Class to represent a set of schema tests as described by a .testSet file
* When executed each of the schemas described in the .testSet file is
round-trip
@@ -143,16 +149,11 @@
* @throws Exception can be IOException or SAXException
*/
private static Document getDocument(InputSource inputSource)
- throws SAXException, IOException {
- DOMParser parser = new DOMParser();
-
- parser.setFeature("http://xml.org/sax/features/namespaces", true);
-
- Document doc = null;
-
- parser.parse(inputSource);
- doc = parser.getDocument();
+ throws ParserConfigurationException, SAXException, IOException {
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ dbf.setNamespaceAware(true);
+ dbf.setValidating(false);
- return doc;
+ return dbf.newDocumentBuilder().parse(inputSource);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]