ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1718126 - in /webservices/axiom/trunk: ./ axiom-compat/ axiom-compat/src/test/java/org/apache/axiom/om/impl/jaxp/ implementations/axiom-dom/ implementations/axiom-impl/ testing/ testing/axiom-testsuite/ testing/axiom-testsuite/src/main/jav...
Date Sat, 05 Dec 2015 22:04:26 GMT
Author: veithen
Date: Sat Dec  5 22:04:25 2015
New Revision: 1718126

URL: http://svn.apache.org/viewvc?rev=1718126&view=rev
Log:
Streamline the selection of XSLT implementations in test cases.

Added:
    webservices/axiom/trunk/testing/jaxp-testsuite/   (with props)
    webservices/axiom/trunk/testing/jaxp-testsuite/pom.xml   (with props)
    webservices/axiom/trunk/testing/jaxp-testsuite/src/
    webservices/axiom/trunk/testing/jaxp-testsuite/src/main/
    webservices/axiom/trunk/testing/jaxp-testsuite/src/main/java/
    webservices/axiom/trunk/testing/jaxp-testsuite/src/main/java/org/
    webservices/axiom/trunk/testing/jaxp-testsuite/src/main/java/org/apache/
    webservices/axiom/trunk/testing/jaxp-testsuite/src/main/java/org/apache/axiom/
    webservices/axiom/trunk/testing/jaxp-testsuite/src/main/java/org/apache/axiom/ts/
    webservices/axiom/trunk/testing/jaxp-testsuite/src/main/java/org/apache/axiom/ts/jaxp/
    webservices/axiom/trunk/testing/jaxp-testsuite/src/main/java/org/apache/axiom/ts/jaxp/XSLTImplementation.java
      - copied, changed from r1718115, webservices/axiom/trunk/testing/testutils/src/main/java/org/apache/axiom/testutils/suite/XSLTImplementation.java
Removed:
    webservices/axiom/trunk/testing/testutils/src/main/java/org/apache/axiom/testutils/suite/XSLTImplementation.java
Modified:
    webservices/axiom/trunk/axiom-compat/pom.xml
    webservices/axiom/trunk/axiom-compat/src/test/java/org/apache/axiom/om/impl/jaxp/StreamSourceToOMResultTest.java
    webservices/axiom/trunk/implementations/axiom-dom/pom.xml
    webservices/axiom/trunk/implementations/axiom-impl/pom.xml
    webservices/axiom/trunk/pom.xml
    webservices/axiom/trunk/testing/axiom-testsuite/pom.xml
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/OMElementExtractor.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/document/TestGetSAXResult.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetSAXSourceIdentityTransform.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetSAXSourceIdentityTransformOnFragment.java
    webservices/axiom/trunk/testing/dom-testsuite/pom.xml
    webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java
    webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestTransformerWithIdentityStylesheet.java
    webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestTransformerWithStylesheet.java
    webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TransformerTestCase.java
    webservices/axiom/trunk/testing/pom.xml
    webservices/axiom/trunk/testing/testutils/pom.xml

Modified: webservices/axiom/trunk/axiom-compat/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-compat/pom.xml?rev=1718126&r1=1718125&r2=1718126&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-compat/pom.xml (original)
+++ webservices/axiom/trunk/axiom-compat/pom.xml Sat Dec  5 22:04:25 2015
@@ -93,8 +93,9 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>xalan</groupId>
-            <artifactId>xalan</artifactId>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>jaxp-testsuite</artifactId>
+            <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
     </dependencies>

Modified: webservices/axiom/trunk/axiom-compat/src/test/java/org/apache/axiom/om/impl/jaxp/StreamSourceToOMResultTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-compat/src/test/java/org/apache/axiom/om/impl/jaxp/StreamSourceToOMResultTest.java?rev=1718126&r1=1718125&r2=1718126&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-compat/src/test/java/org/apache/axiom/om/impl/jaxp/StreamSourceToOMResultTest.java
(original)
+++ webservices/axiom/trunk/axiom-compat/src/test/java/org/apache/axiom/om/impl/jaxp/StreamSourceToOMResultTest.java
Sat Dec  5 22:04:25 2015
@@ -34,8 +34,8 @@ import org.apache.axiom.om.OMMetaFactory
 import org.apache.axiom.testing.multiton.Multiton;
 import org.apache.axiom.testutils.suite.MatrixTestCase;
 import org.apache.axiom.testutils.suite.MatrixTestSuiteBuilder;
+import org.apache.axiom.ts.jaxp.XSLTImplementation;
 import org.apache.axiom.ts.xml.XMLSample;
-import org.apache.xalan.processor.TransformerFactoryImpl;
 import org.xml.sax.InputSource;
 
 public class StreamSourceToOMResultTest extends MatrixTestCase {
@@ -54,7 +54,7 @@ public class StreamSourceToOMResultTest
     protected void runTest() throws Throwable {
         StreamSource source = new StreamSource(file.getUrl().toString());
         OMResult result = new OMResult(omMetaFactory.getOMFactory());
-        new TransformerFactoryImpl().newTransformer().transform(source, result);
+        XSLTImplementation.XALAN.newTransformerFactory().newTransformer().transform(source,
result);
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         result.getDocument().serialize(out);
         InputSource actual = new InputSource();

Modified: webservices/axiom/trunk/implementations/axiom-dom/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/pom.xml?rev=1718126&r1=1718125&r2=1718126&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/pom.xml (original)
+++ webservices/axiom/trunk/implementations/axiom-dom/pom.xml Sat Dec  5 22:04:25 2015
@@ -83,11 +83,6 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>xalan</groupId>
-            <artifactId>xalan</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>testutils</artifactId>
             <version>${project.version}</version>

Modified: webservices/axiom/trunk/implementations/axiom-impl/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/pom.xml?rev=1718126&r1=1718125&r2=1718126&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/pom.xml (original)
+++ webservices/axiom/trunk/implementations/axiom-impl/pom.xml Sat Dec  5 22:04:25 2015
@@ -71,11 +71,6 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>xalan</groupId>
-            <artifactId>xalan</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>testutils</artifactId>
             <version>${project.version}</version>

Modified: webservices/axiom/trunk/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/pom.xml?rev=1718126&r1=1718125&r2=1718126&view=diff
==============================================================================
--- webservices/axiom/trunk/pom.xml (original)
+++ webservices/axiom/trunk/pom.xml Sat Dec  5 22:04:25 2015
@@ -383,16 +383,6 @@
                 <artifactId>xml-apis</artifactId>
                 <version>1.4.01</version>
             </dependency>
-	        <dependency>
-	            <groupId>net.sf.saxon</groupId>
-	            <artifactId>saxon</artifactId>
-	            <version>8.7</version>
-	        </dependency>
-	        <dependency>
-	            <groupId>net.sf.saxon</groupId>
-	            <artifactId>saxon-dom</artifactId>
-	            <version>8.7</version>
-	        </dependency>
             <dependency>
                 <groupId>commons-io</groupId>
                 <artifactId>commons-io</artifactId>

Modified: webservices/axiom/trunk/testing/axiom-testsuite/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/pom.xml?rev=1718126&r1=1718125&r2=1718126&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/pom.xml (original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/pom.xml Sat Dec  5 22:04:25 2015
@@ -75,18 +75,6 @@
             <artifactId>xercesImpl</artifactId>
         </dependency>
         <dependency>
-            <groupId>xalan</groupId>
-            <artifactId>xalan</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>net.sf.saxon</groupId>
-            <artifactId>saxon</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>net.sf.saxon</groupId>
-            <artifactId>saxon-dom</artifactId>
-        </dependency>
-        <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>jaxen-testsuite</artifactId>
             <version>${project.version}</version>
@@ -105,6 +93,11 @@
             <artifactId>xmlbeans</artifactId>
             <version>2.3.0</version>
         </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>jaxp-testsuite</artifactId>
+            <version>${project.version}</version>
+        </dependency>
     </dependencies>
 
     <build>

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java?rev=1718126&r1=1718125&r2=1718126&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java
Sat Dec  5 22:04:25 2015
@@ -27,13 +27,13 @@ import javax.xml.namespace.QName;
 import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.testing.multiton.Multiton;
 import org.apache.axiom.testutils.suite.MatrixTestSuiteBuilder;
-import org.apache.axiom.testutils.suite.XSLTImplementation;
 import org.apache.axiom.ts.dimension.AddAttributeStrategy;
 import org.apache.axiom.ts.dimension.BuilderFactory;
 import org.apache.axiom.ts.dimension.ElementContext;
 import org.apache.axiom.ts.dimension.ExpansionStrategy;
 import org.apache.axiom.ts.dimension.NoNamespaceStrategy;
 import org.apache.axiom.ts.dimension.serialization.SerializationStrategy;
+import org.apache.axiom.ts.jaxp.XSLTImplementation;
 import org.apache.axiom.ts.om.container.OMContainerExtractor;
 import org.apache.axiom.ts.om.container.OMContainerFactory;
 import org.apache.axiom.ts.om.factory.CreateOMElementParentSupplier;
@@ -168,8 +168,7 @@ public class OMTestSuiteBuilder extends
         addTest(new org.apache.axiom.ts.om.document.TestGetOMDocumentElement(metaFactory));
         addTest(new org.apache.axiom.ts.om.document.TestGetOMDocumentElementAfterDetach(metaFactory));
         addTest(new org.apache.axiom.ts.om.document.TestGetOMDocumentElementWithParser(metaFactory));
-        for (int i=0; i<XSLTImplementation.INSTANCES.length; i++) {
-            XSLTImplementation xsltImplementation = XSLTImplementation.INSTANCES[i];
+        for (XSLTImplementation xsltImplementation : getInstances(XSLTImplementation.class))
{
             if (xsltImplementation.supportsLexicalHandlerWithStreamSource()) {
                 for (XMLSample file : getInstances(XMLSample.class)) {
                     addTest(new org.apache.axiom.ts.om.document.TestGetSAXResult(metaFactory,
xsltImplementation, file));
@@ -301,8 +300,7 @@ public class OMTestSuiteBuilder extends
         addTest(new org.apache.axiom.ts.om.element.TestGetQNameWithNamespace(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestGetQNameWithoutNamespace(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestGetSAXResultWithDTD(metaFactory));
-        for (int i=0; i<XSLTImplementation.INSTANCES.length; i++) {
-            XSLTImplementation xsltImplementation = XSLTImplementation.INSTANCES[i];
+        for (XSLTImplementation xsltImplementation : getInstances(XSLTImplementation.class))
{
             addTest(new org.apache.axiom.ts.om.element.TestGetSAXSourceIdentityTransform(metaFactory,
xsltImplementation, true));
             addTest(new org.apache.axiom.ts.om.element.TestGetSAXSourceIdentityTransform(metaFactory,
xsltImplementation, false));
             addTest(new org.apache.axiom.ts.om.element.TestGetSAXSourceIdentityTransformOnFragment(metaFactory,
xsltImplementation, true));

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/OMElementExtractor.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/OMElementExtractor.java?rev=1718126&r1=1718125&r2=1718126&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/OMElementExtractor.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/OMElementExtractor.java
Sat Dec  5 22:04:25 2015
@@ -30,7 +30,7 @@ import javax.xml.transform.stream.Stream
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.testutils.suite.MatrixTestCase;
-import org.apache.xalan.processor.TransformerFactoryImpl;
+import org.apache.axiom.ts.jaxp.XSLTImplementation;
 import org.w3c.dom.Document;
 import org.xml.sax.InputSource;
 
@@ -53,7 +53,7 @@ final class OMElementExtractor extends O
             Document doc = dbf.newDocumentBuilder().parse(testFileContent);
             ByteArrayOutputStream baos = new ByteArrayOutputStream();
             // Use Xalan's factory directly to avoid issues if Saxon is selected as default
-            new TransformerFactoryImpl().newTransformer().transform(
+            XSLTImplementation.XALAN.newTransformerFactory().newTransformer().transform(
                     new DOMSource(doc.getDocumentElement()), new StreamResult(baos));
             return new InputSource(new ByteArrayInputStream(baos.toByteArray()));
         } finally {

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/document/TestGetSAXResult.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/document/TestGetSAXResult.java?rev=1718126&r1=1718125&r2=1718126&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/document/TestGetSAXResult.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/document/TestGetSAXResult.java
Sat Dec  5 22:04:25 2015
@@ -27,8 +27,8 @@ import javax.xml.transform.stream.Stream
 
 import org.apache.axiom.om.OMDocument;
 import org.apache.axiom.om.OMMetaFactory;
-import org.apache.axiom.testutils.suite.XSLTImplementation;
 import org.apache.axiom.ts.ConformanceTestCase;
+import org.apache.axiom.ts.jaxp.XSLTImplementation;
 import org.apache.axiom.ts.xml.XMLSample;
 
 public class TestGetSAXResult extends ConformanceTestCase {
@@ -38,7 +38,7 @@ public class TestGetSAXResult extends Co
             XSLTImplementation xsltImplementation, XMLSample file) {
         super(metaFactory, file);
         this.xsltImplementation = xsltImplementation;
-        xsltImplementation.addTestParameters(this);
+        addTestParameter("xslt", xsltImplementation.getName());
     }
     
     protected void runTest() throws Throwable {

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetSAXSourceIdentityTransform.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetSAXSourceIdentityTransform.java?rev=1718126&r1=1718125&r2=1718126&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetSAXSourceIdentityTransform.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetSAXSourceIdentityTransform.java
Sat Dec  5 22:04:25 2015
@@ -30,8 +30,8 @@ import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMXMLBuilderFactory;
-import org.apache.axiom.testutils.suite.XSLTImplementation;
 import org.apache.axiom.ts.AxiomTestCase;
+import org.apache.axiom.ts.jaxp.XSLTImplementation;
 
 public class TestGetSAXSourceIdentityTransform extends AxiomTestCase {
     private final XSLTImplementation xsltImplementation;
@@ -41,7 +41,7 @@ public class TestGetSAXSourceIdentityTra
         super(metaFactory);
         this.xsltImplementation = xsltImplementation;
         this.cache = cache;
-        xsltImplementation.addTestParameters(this);
+        addTestParameter("xslt", xsltImplementation.getName());
         addTestParameter("cache", cache);
     }
 

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetSAXSourceIdentityTransformOnFragment.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetSAXSourceIdentityTransformOnFragment.java?rev=1718126&r1=1718125&r2=1718126&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetSAXSourceIdentityTransformOnFragment.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetSAXSourceIdentityTransformOnFragment.java
Sat Dec  5 22:04:25 2015
@@ -30,8 +30,8 @@ import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLBuilderFactory;
-import org.apache.axiom.testutils.suite.XSLTImplementation;
 import org.apache.axiom.ts.AxiomTestCase;
+import org.apache.axiom.ts.jaxp.XSLTImplementation;
 import org.xml.sax.ContentHandler;
 
 /**
@@ -62,7 +62,7 @@ public class TestGetSAXSourceIdentityTra
         super(metaFactory);
         this.xsltImplementation = xsltImplementation;
         this.cache = cache;
-        xsltImplementation.addTestParameters(this);
+        addTestParameter("xslt", xsltImplementation.getName());
         addTestParameter("cache", cache);
     }
 

Modified: webservices/axiom/trunk/testing/dom-testsuite/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/dom-testsuite/pom.xml?rev=1718126&r1=1718125&r2=1718126&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/dom-testsuite/pom.xml (original)
+++ webservices/axiom/trunk/testing/dom-testsuite/pom.xml Sat Dec  5 22:04:25 2015
@@ -63,18 +63,6 @@
             <artifactId>xercesImpl</artifactId>
         </dependency>
         <dependency>
-            <groupId>xalan</groupId>
-            <artifactId>xalan</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>net.sf.saxon</groupId>
-            <artifactId>saxon</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>net.sf.saxon</groupId>
-            <artifactId>saxon-dom</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.aspectj</groupId>
             <artifactId>aspectjrt</artifactId>
         </dependency>
@@ -87,6 +75,11 @@
             <groupId>org.mockito</groupId>
             <artifactId>mockito-core</artifactId>
         </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>jaxp-testsuite</artifactId>
+            <version>${project.version}</version>
+        </dependency>
     </dependencies>
 
     <build>

Modified: webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java?rev=1718126&r1=1718125&r2=1718126&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java
(original)
+++ webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java
Sat Dec  5 22:04:25 2015
@@ -31,7 +31,7 @@ import javax.xml.namespace.QName;
 import javax.xml.parsers.DocumentBuilderFactory;
 
 import org.apache.axiom.testutils.suite.MatrixTestSuiteBuilder;
-import org.apache.axiom.testutils.suite.XSLTImplementation;
+import org.apache.axiom.ts.jaxp.XSLTImplementation;
 import org.apache.axiom.ts.xml.XMLSample;
 import org.objectweb.asm.ClassReader;
 import org.w3c.domts.DOMTestCase;
@@ -109,8 +109,7 @@ public final class DOMTestSuiteBuilder e
         addTest(new org.apache.axiom.ts.dom.document.TestLookupNamespaceURIWithEmptyDocument(dbf));
         addTest(new org.apache.axiom.ts.dom.document.TestLookupPrefixWithEmptyDocument(dbf));
         addTest(new org.apache.axiom.ts.dom.document.TestNormalizeDocumentNamespace(dbf));
-        for (int i=0; i<XSLTImplementation.INSTANCES.length; i++) {
-            XSLTImplementation xsltImplementation = XSLTImplementation.INSTANCES[i];
+        for (XSLTImplementation xsltImplementation : getInstances(XSLTImplementation.class))
{
             addTest(new org.apache.axiom.ts.dom.document.TestTransformerWithIdentityStylesheet(dbf,
xsltImplementation));
             addTest(new org.apache.axiom.ts.dom.document.TestTransformerWithStylesheet(dbf,
xsltImplementation));
         }

Modified: webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestTransformerWithIdentityStylesheet.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestTransformerWithIdentityStylesheet.java?rev=1718126&r1=1718125&r2=1718126&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestTransformerWithIdentityStylesheet.java
(original)
+++ webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestTransformerWithIdentityStylesheet.java
Sat Dec  5 22:04:25 2015
@@ -27,7 +27,7 @@ import javax.xml.transform.Transformer;
 import javax.xml.transform.dom.DOMResult;
 import javax.xml.transform.dom.DOMSource;
 
-import org.apache.axiom.testutils.suite.XSLTImplementation;
+import org.apache.axiom.ts.jaxp.XSLTImplementation;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 

Modified: webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestTransformerWithStylesheet.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestTransformerWithStylesheet.java?rev=1718126&r1=1718125&r2=1718126&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestTransformerWithStylesheet.java
(original)
+++ webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestTransformerWithStylesheet.java
Sat Dec  5 22:04:25 2015
@@ -27,7 +27,7 @@ import javax.xml.transform.Transformer;
 import javax.xml.transform.dom.DOMResult;
 import javax.xml.transform.dom.DOMSource;
 
-import org.apache.axiom.testutils.suite.XSLTImplementation;
+import org.apache.axiom.ts.jaxp.XSLTImplementation;
 import org.w3c.dom.Document;
 
 public class TestTransformerWithStylesheet extends TransformerTestCase {

Modified: webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TransformerTestCase.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TransformerTestCase.java?rev=1718126&r1=1718125&r2=1718126&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TransformerTestCase.java
(original)
+++ webservices/axiom/trunk/testing/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TransformerTestCase.java
Sat Dec  5 22:04:25 2015
@@ -20,8 +20,8 @@ package org.apache.axiom.ts.dom.document
 
 import javax.xml.parsers.DocumentBuilderFactory;
 
-import org.apache.axiom.testutils.suite.XSLTImplementation;
 import org.apache.axiom.ts.dom.DOMTestCase;
+import org.apache.axiom.ts.jaxp.XSLTImplementation;
 
 public abstract class TransformerTestCase extends DOMTestCase {
     protected final XSLTImplementation xsltImplementation;
@@ -29,6 +29,6 @@ public abstract class TransformerTestCas
     public TransformerTestCase(DocumentBuilderFactory dbf, XSLTImplementation xsltImplementation)
{
         super(dbf);
         this.xsltImplementation = xsltImplementation;
-        xsltImplementation.addTestParameters(this);
+        addTestParameter("xslt", xsltImplementation.getName());
     }
 }

Propchange: webservices/axiom/trunk/testing/jaxp-testsuite/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Dec  5 22:04:25 2015
@@ -0,0 +1,4 @@
+.classpath
+.project
+.settings
+target

Added: webservices/axiom/trunk/testing/jaxp-testsuite/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/jaxp-testsuite/pom.xml?rev=1718126&view=auto
==============================================================================
--- webservices/axiom/trunk/testing/jaxp-testsuite/pom.xml (added)
+++ webservices/axiom/trunk/testing/jaxp-testsuite/pom.xml Sat Dec  5 22:04:25 2015
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.ws.commons.axiom</groupId>
+        <artifactId>testing</artifactId>
+        <version>1.2.17-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>jaxp-testsuite</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>multiton</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>xalan</groupId>
+            <artifactId>xalan</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>net.sf.saxon</groupId>
+            <artifactId>saxon</artifactId>
+            <version>8.7</version>
+        </dependency>
+        <dependency>
+            <groupId>net.sf.saxon</groupId>
+            <artifactId>saxon-dom</artifactId>
+            <version>8.7</version>
+        </dependency>
+    </dependencies>
+</project>

Propchange: webservices/axiom/trunk/testing/jaxp-testsuite/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: webservices/axiom/trunk/testing/jaxp-testsuite/src/main/java/org/apache/axiom/ts/jaxp/XSLTImplementation.java
(from r1718115, webservices/axiom/trunk/testing/testutils/src/main/java/org/apache/axiom/testutils/suite/XSLTImplementation.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/jaxp-testsuite/src/main/java/org/apache/axiom/ts/jaxp/XSLTImplementation.java?p2=webservices/axiom/trunk/testing/jaxp-testsuite/src/main/java/org/apache/axiom/ts/jaxp/XSLTImplementation.java&p1=webservices/axiom/trunk/testing/testutils/src/main/java/org/apache/axiom/testutils/suite/XSLTImplementation.java&r1=1718115&r2=1718126&rev=1718126&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/testutils/src/main/java/org/apache/axiom/testutils/suite/XSLTImplementation.java
(original)
+++ webservices/axiom/trunk/testing/jaxp-testsuite/src/main/java/org/apache/axiom/ts/jaxp/XSLTImplementation.java
Sat Dec  5 22:04:25 2015
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.axiom.testutils.suite;
+package org.apache.axiom.ts.jaxp;
 
 import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.sax.SAXResult;
@@ -24,46 +24,44 @@ import javax.xml.transform.stream.Stream
 
 import net.sf.saxon.FeatureKeys;
 
+import org.apache.axiom.testing.multiton.Multiton;
 import org.xml.sax.ext.LexicalHandler;
 
 /**
  * Specifies an XSLT implementation for use in a {@link MatrixTestCase}.
  */
-public interface XSLTImplementation extends Dimension {
-    XSLTImplementation[] INSTANCES = new XSLTImplementation[] {
-        new XSLTImplementation() {
-            public void addTestParameters(MatrixTestCase testCase) {
-                testCase.addTestParameter("xslt", "xalan");
-            }
-            
-            public TransformerFactory newTransformerFactory() {
-                return new org.apache.xalan.processor.TransformerFactoryImpl();
-            }
-
-            public boolean supportsLexicalHandlerWithStreamSource() {
-                return true;
-            }
-        },
-        new XSLTImplementation() {
-            public void addTestParameters(MatrixTestCase testCase) {
-                testCase.addTestParameter("xslt", "saxon");
-            }
-            
-            public TransformerFactory newTransformerFactory() {
-                TransformerFactory factory = new net.sf.saxon.TransformerFactoryImpl();
-                // Suppress the "Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0
processor"
-                // message.
-                factory.setAttribute(FeatureKeys.VERSION_WARNING, Boolean.FALSE);
-                return factory;
-            }
-
-            public boolean supportsLexicalHandlerWithStreamSource() {
-                return false;
-            }
-        },
+public abstract class XSLTImplementation extends Multiton {
+    public static final XSLTImplementation XALAN = new XSLTImplementation("xalan", true)
{
+        @Override
+        public TransformerFactory newTransformerFactory() {
+            return new org.apache.xalan.processor.TransformerFactoryImpl();
+        }
     };
     
-    TransformerFactory newTransformerFactory();
+    public static final XSLTImplementation SAXON = new XSLTImplementation("saxon", false)
{
+        @Override
+        public TransformerFactory newTransformerFactory() {
+            TransformerFactory factory = new net.sf.saxon.TransformerFactoryImpl();
+            // Suppress the "Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor"
+            // message.
+            factory.setAttribute(FeatureKeys.VERSION_WARNING, Boolean.FALSE);
+            return factory;
+        }
+    };
+    
+    private final String name;
+    private final boolean supportsLexicalHandlerWithStreamSource;
+    
+    private XSLTImplementation(String name, boolean supportsLexicalHandlerWithStreamSource)
{
+        this.name = name;
+        this.supportsLexicalHandlerWithStreamSource = supportsLexicalHandlerWithStreamSource;
+    }
+
+    public final String getName() {
+        return name;
+    }
+
+    public abstract TransformerFactory newTransformerFactory();
     
     /**
      * Determine if an identity transformation from a {@link StreamSource} to a {@link SAXResult}
@@ -72,5 +70,7 @@ public interface XSLTImplementation exte
      * @return <code>true</code> if the XSLT implementation will invoke the methods
on the
      *         {@link LexicalHandler} set on the {@link SAXResult}, <code>false</code>
otherwise
      */
-    boolean supportsLexicalHandlerWithStreamSource();
+    public final boolean supportsLexicalHandlerWithStreamSource() {
+        return supportsLexicalHandlerWithStreamSource;
+    }
 }

Modified: webservices/axiom/trunk/testing/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/pom.xml?rev=1718126&r1=1718125&r2=1718126&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/pom.xml (original)
+++ webservices/axiom/trunk/testing/pom.xml Sat Dec  5 22:04:25 2015
@@ -44,6 +44,7 @@
         <module>xml-testsuite</module>
         <module>xml-truth</module>
         <module>fom-testsuite</module>
+        <module>jaxp-testsuite</module>
     </modules>
 
     <build>

Modified: webservices/axiom/trunk/testing/testutils/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/testutils/pom.xml?rev=1718126&r1=1718125&r2=1718126&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/testutils/pom.xml (original)
+++ webservices/axiom/trunk/testing/testutils/pom.xml Sat Dec  5 22:04:25 2015
@@ -56,15 +56,5 @@
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
         </dependency>
-        <dependency>
-            <groupId>xalan</groupId>
-            <artifactId>xalan</artifactId>
-            <optional>true</optional>
-        </dependency>
-        <dependency>
-            <groupId>net.sf.saxon</groupId>
-            <artifactId>saxon</artifactId>
-            <optional>true</optional>
-        </dependency>
     </dependencies>
 </project>



Mime
View raw message