You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mu...@apache.org on 2023/01/29 05:54:36 UTC

[xalan-test] branch master updated (8052e352 -> e76644c7)

This is an automated email from the ASF dual-hosted git repository.

mukulg pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/xalan-test.git


    from 8052e352 few fixes to, xalanj tests build file
     new 4a2d81df committing improvements to, xalanj tests configuration
     new e76644c7 committing improvements to, xalanj tests configuration

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build.bat                                          |   6 +-
 build.xml                                          |  62 ++++--
 .../apache/qetest/xsl/XSLApiTestsResultTask.class  | Bin 3650 -> 3640 bytes
 .../apache/qetest/xsl/XSLApiTestsResultTask.java   |   8 +-
 .../src/org/apache/qetest/xsl/XSLTestAntTask.class | Bin 9610 -> 11669 bytes
 .../qetest/xsl/XsltcTestsErrorListener.class       | Bin 0 -> 1004 bytes
 .../apache/qetest/xsl/XsltcTestsErrorListener.java |  35 +++
 .../src/org/apache/qetest/xsl/XsltcTestsTask.class | Bin 0 -> 9804 bytes
 java/src/org/apache/qetest/xsl/XsltcTestsTask.java | 241 +++++++++++++++++++++
 .../qetest/xslwrapper/TraxSystemIdWrapper.java     |  21 +-
 tests/{conf => xsltc}/attribset/attribset15.xml    |   0
 tests/{conf => xsltc}/attribset/attribset15.xsl    |   0
 .../attribset/attribset1_ok.xsl}                   |  15 +-
 tests/{conf => xsltc}/attribset/attribset23.xml    |   0
 tests/{conf => xsltc}/attribset/attribset23.xsl    |   0
 tests/xsltc/attribset/expected_test_results.xml    |  15 ++
 16 files changed, 354 insertions(+), 49 deletions(-)
 create mode 100644 java/src/org/apache/qetest/xsl/XsltcTestsErrorListener.class
 create mode 100644 java/src/org/apache/qetest/xsl/XsltcTestsErrorListener.java
 create mode 100644 java/src/org/apache/qetest/xsl/XsltcTestsTask.class
 create mode 100644 java/src/org/apache/qetest/xsl/XsltcTestsTask.java
 rename tests/{conf => xsltc}/attribset/attribset15.xml (100%)
 rename tests/{conf => xsltc}/attribset/attribset15.xsl (100%)
 copy tests/{conf/variable/impfinal.xsl => xsltc/attribset/attribset1_ok.xsl} (76%)
 rename tests/{conf => xsltc}/attribset/attribset23.xml (100%)
 rename tests/{conf => xsltc}/attribset/attribset23.xsl (100%)
 create mode 100644 tests/xsltc/attribset/expected_test_results.xml


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xalan.apache.org
For additional commands, e-mail: commits-help@xalan.apache.org


[xalan-test] 02/02: committing improvements to, xalanj tests configuration

Posted by mu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mukulg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/xalan-test.git

commit e76644c7ca4465c4daf43b0c1c67e8bd51e10365
Author: Mukul Gandhi <ga...@gmail.com>
AuthorDate: Sun Jan 29 11:24:07 2023 +0530

    committing improvements to, xalanj tests configuration
---
 tests/xsltc/attribset/attribset15.xml           |  7 ++++
 tests/xsltc/attribset/attribset15.xsl           | 43 +++++++++++++++++++++++++
 tests/xsltc/attribset/attribset1_ok.xsl         | 32 ++++++++++++++++++
 tests/xsltc/attribset/attribset23.xml           |  3 ++
 tests/xsltc/attribset/attribset23.xsl           | 41 +++++++++++++++++++++++
 tests/xsltc/attribset/expected_test_results.xml | 15 +++++++++
 6 files changed, 141 insertions(+)

diff --git a/tests/xsltc/attribset/attribset15.xml b/tests/xsltc/attribset/attribset15.xml
new file mode 100644
index 00000000..4e670aa6
--- /dev/null
+++ b/tests/xsltc/attribset/attribset15.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?> 
+<doc>
+<First at="Att1"/>
+<Second at="ped:Att2"/>
+<Third at="xyz:Att3"/>
+<Fourth at="xmlns"/>
+</doc>
\ No newline at end of file
diff --git a/tests/xsltc/attribset/attribset15.xsl b/tests/xsltc/attribset/attribset15.xsl
new file mode 100644
index 00000000..eb954544
--- /dev/null
+++ b/tests/xsltc/attribset/attribset15.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+      xmlns:ped="http://ped.test.com">
+
+  <!-- FileName: attribset15 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Discretionary: name="attribute-name-not-QName" choice="ignore" -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: The name attribute is interpreted as an attribute value template.
+       It is an error if the value of the AVT is not a QNAME or the string "xmlns".
+       (Last two xsl:attributes test this)  -->
+
+<xsl:template match="/">
+  <out xmlns:this="http://www.this.com">
+  	<xsl:attribute name="{doc/First/@at}">First</xsl:attribute>
+  	<xsl:attribute name="{doc/Second/@at}">Second</xsl:attribute>
+  	<xsl:attribute name="{doc/Third/@at}">Third</xsl:attribute>
+  	<xsl:attribute name="xmlns">xmlns</xsl:attribute>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/tests/xsltc/attribset/attribset1_ok.xsl b/tests/xsltc/attribset/attribset1_ok.xsl
new file mode 100644
index 00000000..5bfabdd5
--- /dev/null
+++ b/tests/xsltc/attribset/attribset1_ok.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+                xmlns:ped="http://ped.test.com">
+
+<xsl:template match="/">
+  <out xmlns:this="http://www.this.com">
+     <xsl:attribute name="{doc/First/@at}">First</xsl:attribute>
+     <xsl:attribute name="{doc/Second/@at}">Second</xsl:attribute>
+     <xsl:attribute name="{doc/Third/@at}">Third</xsl:attribute>
+  </out>
+</xsl:template>
+
+
+  <!--
+   * 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/tests/xsltc/attribset/attribset23.xml b/tests/xsltc/attribset/attribset23.xml
new file mode 100644
index 00000000..bb54b129
--- /dev/null
+++ b/tests/xsltc/attribset/attribset23.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?> 
+<doc>
+</doc>
\ No newline at end of file
diff --git a/tests/xsltc/attribset/attribset23.xsl b/tests/xsltc/attribset/attribset23.xsl
new file mode 100644
index 00000000..277e05df
--- /dev/null
+++ b/tests/xsltc/attribset/attribset23.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <!-- FileName: attribset23 -->
+  <!-- Document: http://www.w3.org/TR/xslt -->
+  <!-- DocVersion: 19991116 -->
+  <!-- Section: 7.1.3 Creating Attributes -->
+  <!-- Creator: Paul Dick -->
+  <!-- Purpose: XSLT processors may make use of the prefix of the QNAME specified
+       in the name attribute ... however they are not required to do so and, if 
+       the prefix is xmlns, they must not do so ... this will not result in a 
+       namespace declaration being output. -->
+
+<xsl:template match="/">
+ <root>
+  <Out>
+	<xsl:attribute name="xmlns:xsl" namespace="whatever">http://www.w3.org/1999/XSL/Transform</xsl:attribute>
+  </Out>
+ </root>
+</xsl:template>
+
+
+  <!--
+   * 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.
+  -->
+
+</xsl:stylesheet>
diff --git a/tests/xsltc/attribset/expected_test_results.xml b/tests/xsltc/attribset/expected_test_results.xml
new file mode 100644
index 00000000..a5b8fd98
--- /dev/null
+++ b/tests/xsltc/attribset/expected_test_results.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?> 
+<expectedResults>
+   <file name="attribset1_ok.xsl">
+     <compileError>false</compileError>
+     <expected>pass</expected>
+   </file>
+   <file name="attribset15.xsl">
+     <compileError>true</compileError>
+     <expected>pass</expected>
+   </file>
+   <file name="attribset23.xsl">
+     <compileError>true</compileError>
+     <expected>pass</expected>
+   </file>   
+</expectedResults>
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xalan.apache.org
For additional commands, e-mail: commits-help@xalan.apache.org


[xalan-test] 01/02: committing improvements to, xalanj tests configuration

Posted by mu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mukulg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/xalan-test.git

commit 4a2d81df630adcb54248136f4c2b3ce310cbd641
Author: Mukul Gandhi <ga...@gmail.com>
AuthorDate: Sun Jan 29 11:22:21 2023 +0530

    committing improvements to, xalanj tests configuration
---
 build.bat                                          |   6 +-
 build.xml                                          |  62 ++++--
 .../apache/qetest/xsl/XSLApiTestsResultTask.class  | Bin 3650 -> 3640 bytes
 .../apache/qetest/xsl/XSLApiTestsResultTask.java   |   8 +-
 .../src/org/apache/qetest/xsl/XSLTestAntTask.class | Bin 9610 -> 11669 bytes
 .../qetest/xsl/XsltcTestsErrorListener.class       | Bin 0 -> 1004 bytes
 .../apache/qetest/xsl/XsltcTestsErrorListener.java |  35 +++
 .../src/org/apache/qetest/xsl/XsltcTestsTask.class | Bin 0 -> 9804 bytes
 java/src/org/apache/qetest/xsl/XsltcTestsTask.java | 241 +++++++++++++++++++++
 .../qetest/xslwrapper/TraxSystemIdWrapper.java     |  21 +-
 tests/conf/attribset/attribset15.xml               |   7 -
 tests/conf/attribset/attribset15.xsl               |  43 ----
 tests/conf/attribset/attribset23.xml               |   3 -
 tests/conf/attribset/attribset23.xsl               |  41 ----
 14 files changed, 333 insertions(+), 134 deletions(-)

diff --git a/build.bat b/build.bat
index 0f144627..25481845 100755
--- a/build.bat
+++ b/build.bat
@@ -56,8 +56,12 @@ if exist "%_ANT_HOME%\tools\ant.jar" (
 
 set _CLASSPATH=%_CLASSPATH%;%_ANT_JARS%
 
+set XALAN_BUILD_DIR_PATH=..\xalan-java\build;..\build
+
+set XERCES_ENDORSED_DIR_PATH=..\xalan-java\lib\endorsed;..\lib\endorsed
+
 @echo on
-"%_JAVACMD%" -mx1024m -classpath "%_CLASSPATH%" org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
+"%_JAVACMD%" -mx1024m -Djava.endorsed.dirs=%XALAN_BUILD_DIR_PATH%;%XERCES_ENDORSED_DIR_PATH% -classpath "%_CLASSPATH%" org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
 @echo off
 
 goto end
diff --git a/build.xml b/build.xml
index e5a763e1..cf79b37e 100644
--- a/build.xml
+++ b/build.xml
@@ -191,13 +191,13 @@ dependencies - users must manually 'build jar' first.
     </path>
 
     <!-- Boot class path for JDK 1.4+ -->
-    <path id="boot.class.path">
-        <!--<pathelement location="${xalan.jar}" />
-        <pathelement location="${xsltc.jar}" />-->  <!-- add this so we can test the
-                                                      separate jar distribution -->  
-        <pathelement location="${ser.jar}" />        
+    <path id="boot.class.path">                                  
         <pathelement location="${xml-apis.jar}" />
         <pathelement location="${parserjar}" />
+        <pathelement location="${ser.jar}" />
+        <pathelement location="${xalan.jar}" />
+        <!--<pathelement location="${xsltc.jar}" />-->  <!-- add this so we can test the
+                                                              separate jar distribution -->        
         <pathelement path="${sun.boot.class.path}" />
     </path>
 
@@ -263,7 +263,7 @@ dependencies - users must manually 'build jar' first.
     </taskdef>
 
     <!-- This Ant task checks, the 'api' tests pass or fail status, by inspecting 
-         content within test result XML documents. -->
+         content within test result XML documents -->
     <taskdef name="apiTestsResultTask" classname="org.apache.qetest.xsl.XSLApiTestsResultTask">
        <classpath>
            <pathelement location="${test.src.dir}" />
@@ -272,6 +272,15 @@ dependencies - users must manually 'build jar' first.
         </classpath>
     </taskdef>
 
+    <!-- This Ant task, runs XalanJ xsltc tests -->
+    <taskdef name="xsltcTestsTask" classname="org.apache.qetest.xsl.XsltcTestsTask">
+       <classpath>
+           <pathelement location="${test.src.dir}" />
+           <pathelement location="${test.build.dir}" />
+           <pathelement location="${testxsl.jar}" />
+        </classpath>
+    </taskdef>
+
     <!-- ================================================================== -->
     <!-- Base target for running tests with specified properties.  Actual   -->
     <!-- work is handled by dependent tasks, at most one of which should be -->
@@ -514,13 +523,13 @@ dependencies - users must manually 'build jar' first.
         <antcall target="scan"/>
     </target>
 
-    <target name="accept.xsltc" description="Run TestletDriver over the accept tree">
+    <!--<target name="accept.xsltc" description="Run TestletDriver over the accept tree">
         <property name="testType" value="accept.xsltc." />
         <property name="qetest.summaryFile" value="Accept.xml" />
         <property name="scan.outputDir" value="${accept.xsltc.outputDir}"/>
 	    <property name="use-processor" value="${accept.xsltc.processor}"/>
         <antcall target="conf.xsltc" />
-    </target>
+    </target>-->
 
     <target name="accept.trace" description="Run TestletDriver over the accept tree">
         <property name="accept.trace" value="on"/>
@@ -820,15 +829,17 @@ dependencies - users must manually 'build jar' first.
             description="Run the Xalan-J 2.x XSLTC Smoketest"
             depends="jar,smoketest.xsltc-execute,smoketest.xsltc-notpass,smoketest.xsltc-pass">
     </target>
+    
+    <!-- The following compiles the minimum to run the smoketests, runs them, 
+         and creates distros just of the results and existing tree, 
+         without actually running the docs - this is to ensure that 
+         doc build errors in the tests won't affect GUMP runs.
+    -->
     <target name="smoketest.dev" 
             description="Run the Xalan-J 2.x Smoketest with dependencies"
-            depends="jar,minitest-execute,extensions.classes,smoketest-execute,minitest-notpass,minitest-pass,smoketest-notpass,smoketest-pass">
-        <!-- This compiles the minimum to run the smoketests, runs them, 
-             and creates distros just of the results and existing tree, 
-             without actually running the docs - this is to ensure that 
-             doc build errors in the tests won't affect GUMP runs.
-        -->
+            depends="jar,minitest-execute,extensions.classes,smoketest-execute,minitest-notpass,minitest-pass,smoketest-notpass,smoketest-pass">        
     </target>
+
     <target name="smoketest.gump" 
             description="Run the Xalan-J 2.x Smoketest in automated builds with dependencies">
        <antcall target="minitest.gump">
@@ -889,15 +900,15 @@ dependencies - users must manually 'build jar' first.
             <param name="testType" value="smoketest.xsltc.conf."/>
         </antcall>
 
-        <echo message="About to execute Accept tests..." />
+        <!--<echo message="About to execute Accept tests..." />
         <antcall target="accept.xsltc">
             <param name="testType" value="smoketest.xsltc.accept."/>
-        </antcall>
+        </antcall>-->
 
         <condition property="smoketest.xsltc-passed">
             <and>
                 <available file="${smoketest.xsltc.conf.passFile}" />
-                <available file="${smoketest.xsltc.accept.passFile}" />
+                <!--<available file="${smoketest.xsltc.accept.passFile}" />-->
             </and>
         </condition>
         <antcall target="scan">
@@ -1688,8 +1699,8 @@ dependencies - users must manually 'build jar' first.
         <echo message="Executing Xalan-xsltc conf test: ${testClass}" />
         <!-- Special: allow explicit test.properties overrides for inputDir, etc for xsltc -->
         <property name="testType" value="conf.xsltc." />
-	<!-- Set indent-number to 0 to match Xalan's default indentation -->
-	<property name="${testType}Processor.setAttribute.indent-number" value="0"/>
+	    <!-- Set indent-number to 0 to match Xalan's default indentation -->
+	    <property name="${testType}Processor.setAttribute.indent-number" value="0"/>
         <antcall target="run.xalantest">
             <param name="xalantest.classpathref"
                    value="xsltc.runtime.class.path" />
@@ -1699,6 +1710,19 @@ dependencies - users must manually 'build jar' first.
         </antcall>
         <property name="scan.outputDir" value="${conf.xsltc.outputDir}"/>
         <antcall target="scan" />
+
+        <echo message=" [minitest] COMPLETED, running the conf.xsltc tests (excluding the xsltc compile tests)" />
+        <echo message=""/>
+
+        <mkdir dir="results-xsltc-compile-tests"/>
+        
+        <xsltcTestsTask inputDir="tests/xsltc/attribset" 
+                        resultDir="results-xsltc-compile-tests" 
+                        bootclasspathref="boot.class.path"/>
+
+        <echo message=""/>
+        <echo message=" [minitest] CONGRATULATIONS! The xsltc compile tests have passed!" />
+        <echo message=" [minitest] See details of the xsltc compile tests results, at results-xsltc-compile-tests/actual_test_results.xml" />                        
     </target>
 
     <target name="perf.xsltc" description="Run TestletDriver over the perf tree using xsltc">
diff --git a/java/src/org/apache/qetest/xsl/XSLApiTestsResultTask.class b/java/src/org/apache/qetest/xsl/XSLApiTestsResultTask.class
index 8688417f..4edc891a 100644
Binary files a/java/src/org/apache/qetest/xsl/XSLApiTestsResultTask.class and b/java/src/org/apache/qetest/xsl/XSLApiTestsResultTask.class differ
diff --git a/java/src/org/apache/qetest/xsl/XSLApiTestsResultTask.java b/java/src/org/apache/qetest/xsl/XSLApiTestsResultTask.java
index 680e75af..8f4d9684 100644
--- a/java/src/org/apache/qetest/xsl/XSLApiTestsResultTask.java
+++ b/java/src/org/apache/qetest/xsl/XSLApiTestsResultTask.java
@@ -40,14 +40,16 @@ public class XSLApiTestsResultTask extends Task {
                if (!PASS.equals(testResultFilePassStatus)) {
                   String[] dirNameParts = (this.resultDir).split("/"); 
                   String errorContextFileName = dirNameParts[dirNameParts.length - 1] + "/" + fileName;
-                  throw new BuildException("One or more tests in an 'api' target failed. Test failure was found, while inspecting the file " + errorContextFileName + ". Please fix any api tests problems before checking in!", location);
+                  throw new BuildException("One or more tests in an 'api' target failed. Test failure was found, " + 
+                                           "while inspecting the file " + errorContextFileName + ". Please fix any api tests " + 
+                                           "problems before checking in!", location);
                }
            } 
         }
     }
 
-    public void setResultDir(String dirPath) {
-        this.resultDir = dirPath;
+    public void setResultDir(String resultDir) {
+        this.resultDir = resultDir;
     }
 
     public void setFileNamePrefix(String fileNamePrefix) {
diff --git a/java/src/org/apache/qetest/xsl/XSLTestAntTask.class b/java/src/org/apache/qetest/xsl/XSLTestAntTask.class
index c69771ad..26ac031f 100644
Binary files a/java/src/org/apache/qetest/xsl/XSLTestAntTask.class and b/java/src/org/apache/qetest/xsl/XSLTestAntTask.class differ
diff --git a/java/src/org/apache/qetest/xsl/XsltcTestsErrorListener.class b/java/src/org/apache/qetest/xsl/XsltcTestsErrorListener.class
new file mode 100644
index 00000000..85e8a508
Binary files /dev/null and b/java/src/org/apache/qetest/xsl/XsltcTestsErrorListener.class differ
diff --git a/java/src/org/apache/qetest/xsl/XsltcTestsErrorListener.java b/java/src/org/apache/qetest/xsl/XsltcTestsErrorListener.java
new file mode 100644
index 00000000..991d1604
--- /dev/null
+++ b/java/src/org/apache/qetest/xsl/XsltcTestsErrorListener.java
@@ -0,0 +1,35 @@
+package org.apache.qetest.xsl;
+
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.ErrorListener;
+
+/*
+   An object of this class, can be set on XalanJ TransformerFactory
+   to report run-time XSLTC compilation errors.
+
+   @author <a href="mailto:mukulg@apache.org">Mukul Gandhi</a>
+*/
+public class XsltcTestsErrorListener implements ErrorListener {
+
+      private String errListenerMesg = null;
+
+	  @Override
+	  public void warning(TransformerException ex) throws TransformerException {
+	     // NO OP
+	  }
+
+	  @Override
+	  public void error(TransformerException ex) throws TransformerException {
+         // NO OP
+	  }
+
+	  @Override
+	  public void fatalError(TransformerException ex) throws TransformerException {
+          this.errListenerMesg = ex.getMessage();
+	  }
+
+      public String getErrListenerMesg() {
+          return this.errListenerMesg; 
+      }
+		
+}
\ No newline at end of file
diff --git a/java/src/org/apache/qetest/xsl/XsltcTestsTask.class b/java/src/org/apache/qetest/xsl/XsltcTestsTask.class
new file mode 100644
index 00000000..1786ec80
Binary files /dev/null and b/java/src/org/apache/qetest/xsl/XsltcTestsTask.class differ
diff --git a/java/src/org/apache/qetest/xsl/XsltcTestsTask.java b/java/src/org/apache/qetest/xsl/XsltcTestsTask.java
new file mode 100644
index 00000000..0580958e
--- /dev/null
+++ b/java/src/org/apache/qetest/xsl/XsltcTestsTask.java
@@ -0,0 +1,241 @@
+package org.apache.qetest.xsl;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.Commandline;
+import org.apache.tools.ant.types.CommandlineJava;
+import org.apache.tools.ant.types.Reference;
+import org.apache.tools.ant.types.Path;
+
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathFactory;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.ls.DOMImplementationLS;
+import org.w3c.dom.ls.LSSerializer;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.Iterator;
+
+/*
+   This ant task can, check whether XalanJ's XSLTC processor 
+   can compile XSLT stylesheets correctly.
+
+   @author <a href="mailto:mukulg@apache.org">Mukul Gandhi</a>
+*/
+public class XsltcTestsTask extends Task {
+    
+    private String inputDir;
+
+    private String resultDir;
+
+    private static final String XSLT_FILE_EXT = ".xsl";
+
+    private static final String expectedTestResultsDoc = "expected_test_results.xml";
+
+    private static final String testResultsDoc = "actual_test_results.xml";
+
+    private static final String STYLESHEET_COMPILATION_ERR_MESG = "Could not compile stylesheet";
+
+    private static final String PASS = "pass";
+
+    private static final String FAIL = "fail";
+
+    private CommandlineJava commandLineJava = new CommandlineJava();
+
+    // method to run this, ant build task
+    public void execute() throws BuildException {
+
+        System.setProperty("javax.xml.transform.TransformerFactory", 
+		                        "org.apache.xalan.xsltc.trax.TransformerFactoryImpl");
+
+        Document expectedTestResultsDocument = getExpectedTestResultsDocument();
+        
+        Map<String, Boolean> testResults = new HashMap<String, Boolean>();
+
+        File dirObj = new File(this.inputDir);
+        File[] fileList = dirObj.listFiles();
+        
+        boolean isXsltcTestsPassed = true;
+
+        try {
+            for (int idx = 0; idx < fileList.length; idx++) {
+               String fileName = fileList[idx].getName();
+               if (fileName.endsWith(XSLT_FILE_EXT)) {                  
+                  XsltcTestsErrorListener xsltcTestsErrorListener = new XsltcTestsErrorListener();                      
+                  compileXslDocument(fileName, xsltcTestsErrorListener);
+                  boolean isCompileErrorOccured = STYLESHEET_COMPILATION_ERR_MESG.
+                                                          equals(xsltcTestsErrorListener.getErrListenerMesg());                                                                               
+                  boolean hasTestPassed = isTestPassed(expectedTestResultsDocument, 
+                                                              fileName, isCompileErrorOccured);
+                  if (hasTestPassed) {
+                     testResults.put(fileName, Boolean.TRUE);
+                  }
+                  else {
+                     testResults.put(fileName, Boolean.FALSE);
+                     isXsltcTestsPassed = false;
+                  }                                      
+               }
+            }
+
+            serializeTestResultsToXmlDocument(testResults);
+        }
+        catch (Exception ex) {
+           throw new BuildException(ex.getMessage(), location);
+        }
+        
+        if (!isXsltcTestsPassed) {
+           throw new BuildException("One or more XSLTC tests have failed. Please fix any XSLTC tests problems, " + 
+                                      "before checking in! XSLTC test results are available at " + resultDir + "/" + 
+                                        testResultsDoc , location);
+        }
+    }
+
+    public void setInputDir(String inputDir) {
+        this.inputDir = inputDir;
+    }
+
+    public void setResultDir(String resultDir) {
+        this.resultDir = resultDir;
+    }
+
+    /**
+     * Set the bootclasspathref to be used for this test.
+     *
+     * @param bootclasspathref used for running the test
+     */
+    public void setBootclasspathref(Reference ref)
+    {
+        String jdkRelease =
+                   System.getProperty("java.version", "0.0").substring(0,3);
+        if (!jdkRelease.equals("1.1")
+                && !jdkRelease.equals("1.2")
+                && !jdkRelease.equals("1.3")) {
+            Path p = (Path)ref.getReferencedObject(this.getProject());
+            createJvmarg().setValue("-Xbootclasspath/p:" + p);
+        }
+    }
+
+    /**
+     * Creates a nested jvmarg element.
+     *
+     * @return Argument to send to our JVM if forking
+     */
+    public Commandline.Argument createJvmarg()
+    {
+        return commandLineJava.createVmArgument();
+    } 
+
+    /*
+       This method, attempts to compile an XSLT stylesheet. If the stylesheet
+       cannot be compiled, the registered error listener sets the resulting
+       error message within a variable.
+    */
+    private void compileXslDocument(String xslName, XsltcTestsErrorListener 
+                                                        xsltcTestsErrorListener) {         
+         try {
+            TransformerFactory trfFactory = TransformerFactory.newInstance();         
+            trfFactory.setErrorListener(xsltcTestsErrorListener);
+            Transformer transformer = trfFactory.newTransformer(
+                                                new StreamSource(this.inputDir + "/" + xslName));
+         }
+         catch (Exception ex) {
+            // NO OP
+         }                                                      
+    }
+
+    /*
+       An expected tests results document, is already available before running
+       this ant task. This method, returns an XML DOM representation of that
+       XML document.
+    */
+    private Document getExpectedTestResultsDocument() { 
+       Document xmlResultDocument = null;
+
+       try {
+          DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
+          DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
+          xmlResultDocument = docBuilder.parse(this.inputDir + "/" + expectedTestResultsDoc);
+       }
+       catch (Exception ex) {
+          throw new BuildException(ex.getMessage(), location);
+       }
+      
+       return xmlResultDocument; 
+    }
+
+    /*
+       This method, checks whether an XSLTC test that has been run, 
+       has passed or not.
+    */
+    private boolean isTestPassed(Document expectedTestResultsDoc, 
+                                    String xslFileName, boolean isCompileErrorOccured) 
+                                                                      throws Exception {
+       XPath xPath = XPathFactory.newInstance().newXPath();
+       String isCompileErrorOccuredStr = (new Boolean(isCompileErrorOccured)).toString();
+       String xpathExprStr = "/expectedResults/file[@name = '" + xslFileName + "' and " +
+                                  "compileError = '" + isCompileErrorOccuredStr + "']/expected";                                 
+       String xpathNodeStrValue = (String)((xPath.compile(xpathExprStr)).
+                                                    evaluate(expectedTestResultsDoc, 
+                                                                 XPathConstants.STRING));
+       return PASS.equals(xpathNodeStrValue) ? true : false;                                                                
+    }
+
+    /*
+       Given XSLTC overall test results, produced by this class (avilable as Map object),
+       this method serializes those results to an XML document.
+    */
+    private void serializeTestResultsToXmlDocument(Map testResultsMap) 
+                                                              throws Exception {
+       Set<Map.Entry<String,Boolean>> mapEntries = testResultsMap.entrySet();
+       Iterator<Map.Entry<String,Boolean>> iter = mapEntries.iterator();
+       
+       DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
+       DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
+       Document resultDocument = docBuilder.newDocument();
+
+       Element testResultsElem = resultDocument.createElement("testResults");       
+       while (iter.hasNext()) {
+          Map.Entry<String,Boolean> mapEntry = iter.next();
+          String fileName = mapEntry.getKey();
+          Boolean passStatus = mapEntry.getValue();
+          
+          Element resultElem = resultDocument.createElement("result");
+          Element fileNameElem = resultDocument.createElement("fileName");
+          fileNameElem.appendChild(resultDocument.createTextNode(fileName));
+          resultElem.appendChild(fileNameElem);
+          Element passElem = resultDocument.createElement("pass");
+          passElem.appendChild(resultDocument.createTextNode(passStatus == 
+                                                   Boolean.TRUE ? "true" : "false"));
+          resultElem.appendChild(passElem);
+          
+          testResultsElem.appendChild(resultElem);
+       }
+
+       resultDocument.appendChild(testResultsElem);
+
+       DOMImplementationLS domImplementation = (DOMImplementationLS) 
+                                                         resultDocument.getImplementation();
+       LSSerializer lsSerializer = domImplementation.createLSSerializer();
+       (lsSerializer.getDomConfig()).setParameter("format-pretty-print", Boolean.TRUE);
+       String resultDocumentXmlStr = lsSerializer.writeToString(resultDocument);
+
+       Files.write(Paths.get(resultDir + "/" + testResultsDoc), 
+                                                    resultDocumentXmlStr.getBytes());
+    }
+
+}
diff --git a/java/src/org/apache/qetest/xslwrapper/TraxSystemIdWrapper.java b/java/src/org/apache/qetest/xslwrapper/TraxSystemIdWrapper.java
index d0f337ec..162b7e6b 100644
--- a/java/src/org/apache/qetest/xslwrapper/TraxSystemIdWrapper.java
+++ b/java/src/org/apache/qetest/xslwrapper/TraxSystemIdWrapper.java
@@ -69,8 +69,6 @@ public class TraxSystemIdWrapper extends TransformWrapperHelper
      */
     protected Hashtable newProcessorOpts = null;
 
-    private static final String STYLESHEET_COMPILATION_ERR_MESG = "Could not compile stylesheet";
-
     /**
      * Get a general description of this wrapper itself.
      *
@@ -166,22 +164,11 @@ public class TraxSystemIdWrapper extends TransformWrapperHelper
         
         // Timed: read/build xsl from a URL
         startTime = System.currentTimeMillis();
-        Transformer transformer = null;
-        try {
-           transformer = factory.newTransformer(
-                                   new StreamSource(QetestUtils.filenameToURL(xslName)));
-        }
-        catch (Exception ex) {
-           // we're presently not testing stylesheet compilation errors
-           if (STYLESHEET_COMPILATION_ERR_MESG.equals(ex.getMessage())) {              
-              return getTimeArray();
-           }
-           else {
-              throw ex;
-           }
-        }
-
+        
+        Transformer transformer = factory.newTransformer(
+                                   new StreamSource(QetestUtils.filenameToURL(xslName)));       
         transformer.setErrorListener(new DefaultErrorHandler());
+
         xslBuild = System.currentTimeMillis() - startTime;
 
         // Untimed: Set any of our options as Attributes on the transformer
diff --git a/tests/conf/attribset/attribset15.xml b/tests/conf/attribset/attribset15.xml
deleted file mode 100644
index 4e670aa6..00000000
--- a/tests/conf/attribset/attribset15.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0"?> 
-<doc>
-<First at="Att1"/>
-<Second at="ped:Att2"/>
-<Third at="xyz:Att3"/>
-<Fourth at="xmlns"/>
-</doc>
\ No newline at end of file
diff --git a/tests/conf/attribset/attribset15.xsl b/tests/conf/attribset/attribset15.xsl
deleted file mode 100644
index eb954544..00000000
--- a/tests/conf/attribset/attribset15.xsl
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
-      xmlns:ped="http://ped.test.com">
-
-  <!-- FileName: attribset15 -->
-  <!-- Document: http://www.w3.org/TR/xslt -->
-  <!-- DocVersion: 19991116 -->
-  <!-- Section: 7.1.3 Creating Attributes -->
-  <!-- Discretionary: name="attribute-name-not-QName" choice="ignore" -->
-  <!-- Creator: Paul Dick -->
-  <!-- Purpose: The name attribute is interpreted as an attribute value template.
-       It is an error if the value of the AVT is not a QNAME or the string "xmlns".
-       (Last two xsl:attributes test this)  -->
-
-<xsl:template match="/">
-  <out xmlns:this="http://www.this.com">
-  	<xsl:attribute name="{doc/First/@at}">First</xsl:attribute>
-  	<xsl:attribute name="{doc/Second/@at}">Second</xsl:attribute>
-  	<xsl:attribute name="{doc/Third/@at}">Third</xsl:attribute>
-  	<xsl:attribute name="xmlns">xmlns</xsl:attribute>
-  </out>
-</xsl:template>
-
-
-  <!--
-   * 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.
-  -->
-
-</xsl:stylesheet>
diff --git a/tests/conf/attribset/attribset23.xml b/tests/conf/attribset/attribset23.xml
deleted file mode 100644
index bb54b129..00000000
--- a/tests/conf/attribset/attribset23.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<?xml version="1.0"?> 
-<doc>
-</doc>
\ No newline at end of file
diff --git a/tests/conf/attribset/attribset23.xsl b/tests/conf/attribset/attribset23.xsl
deleted file mode 100644
index 277e05df..00000000
--- a/tests/conf/attribset/attribset23.xsl
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-  <!-- FileName: attribset23 -->
-  <!-- Document: http://www.w3.org/TR/xslt -->
-  <!-- DocVersion: 19991116 -->
-  <!-- Section: 7.1.3 Creating Attributes -->
-  <!-- Creator: Paul Dick -->
-  <!-- Purpose: XSLT processors may make use of the prefix of the QNAME specified
-       in the name attribute ... however they are not required to do so and, if 
-       the prefix is xmlns, they must not do so ... this will not result in a 
-       namespace declaration being output. -->
-
-<xsl:template match="/">
- <root>
-  <Out>
-	<xsl:attribute name="xmlns:xsl" namespace="whatever">http://www.w3.org/1999/XSL/Transform</xsl:attribute>
-  </Out>
- </root>
-</xsl:template>
-
-
-  <!--
-   * 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.
-  -->
-
-</xsl:stylesheet>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xalan.apache.org
For additional commands, e-mail: commits-help@xalan.apache.org