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 2025/03/20 13:29:39 UTC

(xalan-java) branch xalan-j_xslt3.0_mvn updated: improving xalan-j's xsl 3 implementation, by having xsl:apply-templates instruction processing sequence of xdm atomic values

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

mukulg pushed a commit to branch xalan-j_xslt3.0_mvn
in repository https://gitbox.apache.org/repos/asf/xalan-java.git


The following commit(s) were added to refs/heads/xalan-j_xslt3.0_mvn by this push:
     new 73352586f improving xalan-j's xsl 3 implementation, by having xsl:apply-templates instruction processing sequence of xdm atomic values
73352586f is described below

commit 73352586f111d1e6373e363650103180f7113930
Author: Mukul Gandhi <ga...@gmail.com>
AuthorDate: Thu Mar 20 18:59:23 2025 +0530

    improving xalan-j's xsl 3 implementation, by having xsl:apply-templates instruction processing sequence of xdm atomic values
---
 .../apache/xalan/templates/ElemApplyTemplates.java | 73 +++++++++++++++-------
 .../org/apache/xalan/templates/TemplateList.java   | 16 ++++-
 .../java/org/apache/xpath/compiler/Keywords.java   | 10 ++-
 .../java/org/apache/xpath/compiler/OpCodes.java    |  5 ++
 .../org/apache/xpath/compiler/XPathParser.java     | 16 ++++-
 .../apache/xalan/tests/xslt3/XslTemplateTests.java | 40 ++++++++++++
 src/test/resources/xsl_template/gold/test10.out    |  3 +
 src/test/resources/xsl_template/gold/test11.out    |  6 ++
 src/test/resources/xsl_template/gold/test12.out    |  6 ++
 src/test/resources/xsl_template/gold/test13.out    |  6 ++
 src/test/resources/xsl_template/test11.xsl         | 41 ++++++++++++
 src/test/resources/xsl_template/test12.xsl         | 43 +++++++++++++
 src/test/resources/xsl_template/test13.xsl         | 54 ++++++++++++++++
 src/test/resources/xsl_template/test14.xsl         | 44 +++++++++++++
 14 files changed, 334 insertions(+), 29 deletions(-)

diff --git a/src/main/java/org/apache/xalan/templates/ElemApplyTemplates.java b/src/main/java/org/apache/xalan/templates/ElemApplyTemplates.java
index 97369786e..e7a56462c 100644
--- a/src/main/java/org/apache/xalan/templates/ElemApplyTemplates.java
+++ b/src/main/java/org/apache/xalan/templates/ElemApplyTemplates.java
@@ -209,12 +209,17 @@ public class ElemApplyTemplates extends ElemCallTemplate
     
     SourceLocator srcLocator = xctxt.getSAXLocator();
     
+    XObject varEvalResult = null;
+    
+    ResultSequence resultSeq = null;
+    
     if (m_selectExpression instanceof XPathSequenceConstructor) {
-    	ResultSequence resultSeq = (ResultSequence)(((XPathSequenceConstructor)m_selectExpression).execute(xctxt));
+    	resultSeq = (ResultSequence)(((XPathSequenceConstructor)m_selectExpression).execute(xctxt));
     	
     	if (isAllSeqItemsXdmAtomicValues(resultSeq)) {
-    		iterateAndSerializeXslAtomicValues(transformer, xctxt, resultSeq);
-
+    		// Added for XSLT 3.0    		
+    		executeXslTransformAtomicValueSeq(transformer, xctxt, resultSeq);
+    		
     		return;
     	}
     	else {
@@ -226,15 +231,15 @@ public class ElemApplyTemplates extends ElemCallTemplate
     			return;
     		}
     	}
-    }
+    }    
     else if (m_selectExpression instanceof Variable) {
-       XObject varEvalResult = ((Variable)m_selectExpression).execute(xctxt);
+       varEvalResult = ((Variable)m_selectExpression).execute(xctxt);
        
        if (varEvalResult instanceof ResultSequence) {
-    	   ResultSequence resultSeq = (ResultSequence)varEvalResult;
+    	   resultSeq = (ResultSequence)varEvalResult;
     	   
     	   if (isAllSeqItemsXdmAtomicValues(resultSeq)) {
-    		   iterateAndSerializeXslAtomicValues(transformer, xctxt, resultSeq);
+    		   executeXslTransformAtomicValueSeq(transformer, xctxt, resultSeq);
 
     		   return;
     	   }
@@ -257,13 +262,13 @@ public class ElemApplyTemplates extends ElemCallTemplate
        }
     }
     else {
-       XObject varEvalResult = m_selectExpression.execute(xctxt);
+       varEvalResult = m_selectExpression.execute(xctxt);
        
        if (varEvalResult instanceof ResultSequence) {
-    	   ResultSequence resultSeq = (ResultSequence)varEvalResult;
+    	   resultSeq = (ResultSequence)varEvalResult;
     	   
     	   if (isAllSeqItemsXdmAtomicValues(resultSeq)) {
-    		   iterateAndSerializeXslAtomicValues(transformer, xctxt, resultSeq);
+    		   executeXslTransformAtomicValueSeq(transformer, xctxt, resultSeq);
 
     		   return;
     	   }
@@ -280,6 +285,23 @@ public class ElemApplyTemplates extends ElemCallTemplate
        else if (varEvalResult instanceof XNodeSet) {
     	   sourceNodes = ((XNodeSet)varEvalResult).asIterator(xctxt, sourceNode);
        }
+       else if (isXdmItemAtomicValue(varEvalResult)) {
+    	   // Added for XSLT 3.0    	   
+    	   final StylesheetRoot sroot1 = transformer.getStylesheet();
+    	   final TemplateList tlOne = sroot1.getTemplateListComposed();
+    	   ElemTemplate template = tlOne.getTemplate(".");
+    	   
+    	   xctxt.setXPath3ContextItem(varEvalResult);
+    	   
+    	   for (ElemTemplateElement t = template.m_firstChild; t != null; t = t.m_nextSibling) {
+    		   xctxt.setSAXLocator(t);
+    		   transformer.pushElemTemplateElement(t);    		   
+    		   t.execute(transformer);
+    		   transformer.popElemTemplateElement();
+    	   }
+
+    	   return;
+       }
        else {
     	   throw new TransformerException("XTTE0505 : xsl:apply-templates 'select' expression evaluation "
     	   		                                 											+ "resulted in a value that is not "
@@ -319,6 +341,7 @@ public class ElemApplyTemplates extends ElemCallTemplate
       final SerializationHandler rth = transformer.getSerializationHandler();
       final StylesheetRoot sroot = transformer.getStylesheet();
       final TemplateList tl = sroot.getTemplateListComposed();
+      
       final boolean quiet = transformer.getQuietConflictWarnings();
       
       // Should be able to get this from the iterator 
@@ -617,24 +640,26 @@ public class ElemApplyTemplates extends ElemCallTemplate
   }
 
   /**
-   * Iterate all items within the supplied XDM sequence, and XSL transform 
-   * and emit them to an XSL transform's output.
+   * This method definition does, an XSL transformation of a 
+   * sequence of XDM atomic values.
    */
-  protected void iterateAndSerializeXslAtomicValues(TransformerImpl transformer, final XPathContext xctxt,
+  private void executeXslTransformAtomicValueSeq(TransformerImpl transformer, final XPathContext xctxt,
 		  														ResultSequence resultSeq) throws TransformerException {
-	  for (int idx = 0; idx < resultSeq.size(); idx++) {
-		  XObject resultSeqItem = resultSeq.item(idx);
-
-		  setXPathContextForXslSequenceProcessing(resultSeq.size(), idx, resultSeq, xctxt);
+	  
+	  final StylesheetRoot sroot = transformer.getStylesheet();
+	  final TemplateList tl = sroot.getTemplateListComposed();
+	  ElemTemplate template = tl.getTemplate(".");    		    		
 
-		  for (ElemTemplateElement elemTemplateElem = this.m_firstChild; elemTemplateElem != null; 
-				  													elemTemplateElem = elemTemplateElem.m_nextSibling) {
-			  xctxt.setSAXLocator(elemTemplateElem);
-			  transformer.setCurrentElement(elemTemplateElem);
-			  elemTemplateElem.execute(transformer);              
+	  for (int idx = 0; idx < resultSeq.size(); idx++) {
+		  XObject xObj = resultSeq.item(idx);
+		  xctxt.setXPath3ContextItem(xObj);
+		  for (ElemTemplateElement t = template.m_firstChild; 
+				                                         t != null; t = t.m_nextSibling) {
+			  xctxt.setSAXLocator(t);
+			  transformer.pushElemTemplateElement(t);    		   
+			  t.execute(transformer);
+			  transformer.popElemTemplateElement();
 		  }
-
-		  resetXPathContextForXslSequenceProcessing(resultSeqItem, xctxt);
 	  }
   }
 
diff --git a/src/main/java/org/apache/xalan/templates/TemplateList.java b/src/main/java/org/apache/xalan/templates/TemplateList.java
index 5816f15ff..121564a42 100644
--- a/src/main/java/org/apache/xalan/templates/TemplateList.java
+++ b/src/main/java/org/apache/xalan/templates/TemplateList.java
@@ -106,8 +106,14 @@ public class TemplateList implements java.io.Serializable
     if (null != matchXPath)
     {
       Expression matchExpr = matchXPath.getExpression();
-
-      if (matchExpr instanceof StepPattern)
+      
+      XPath templateMatchXPath = template.getMatch();
+      String xpathPatternStr = templateMatchXPath.getPatternString();
+	  if (".".equalsIgnoreCase(xpathPatternStr)) {
+		 // added for XSLT 3.0		  
+		 m_patternTable.put(String.valueOf(xpathPatternStr), template);
+	  }
+	  else if (matchExpr instanceof StepPattern)
       {
         insertPatternInTable((StepPattern) matchExpr, template);
       }
@@ -124,7 +130,6 @@ public class TemplateList implements java.io.Serializable
       }
       else
       {
-
         // TODO: assert error
       }
     }
@@ -721,6 +726,11 @@ public class TemplateList implements java.io.Serializable
   {
     return new TemplateWalker();
   }
+  
+  public ElemTemplate getTemplate(String patternStr)
+  {
+	  return (ElemTemplate)m_patternTable.get(patternStr);
+  }
 
   /**
    * Check for match conflicts, and warn the stylesheet author.
diff --git a/src/main/java/org/apache/xpath/compiler/Keywords.java b/src/main/java/org/apache/xpath/compiler/Keywords.java
index 7a1c3f157..932ad413f 100644
--- a/src/main/java/org/apache/xpath/compiler/Keywords.java
+++ b/src/main/java/org/apache/xpath/compiler/Keywords.java
@@ -103,6 +103,9 @@ public class Keywords
 
   /** Any node test string. */
   private static final String NODETYPE_NODE_STRING = "node";
+  
+  /** Context item node test string. Added for XSLT 3.0. */
+  private static final String NODETYPE_CONTEXT_ITEM_STRING = ".";
 
   /** Wildcard element string. */
   private static final String NODETYPE_ANYELEMENT_STRING = "*";
@@ -761,6 +764,11 @@ public class Keywords
                     new Integer(OpCodes.NODETYPE_NODE));
     m_nodetypes.put(NODETYPE_ANYELEMENT_STRING,
                     new Integer(OpCodes.NODETYPE_ANYELEMENT));
+    
+    // added for XSLT 3.0
+    m_nodetypes.put(NODETYPE_CONTEXT_ITEM_STRING,
+                    new Integer(OpCodes.NODETYPE_CONTEXT_ITEM));
+    
     m_keywords.put(FROM_SELF_ABBREVIATED_STRING,
                    new Integer(OpCodes.FROM_SELF));
     m_keywords.put(FUNC_ID_STRING,
@@ -774,7 +782,7 @@ public class Keywords
     m_nodetests.put(NODETYPE_PI_STRING,
                     new Integer(OpCodes.NODETYPE_PI));
     m_nodetests.put(NODETYPE_NODE_STRING,
-                    new Integer(OpCodes.NODETYPE_NODE));    
+                    new Integer(OpCodes.NODETYPE_NODE));
   }
   
   static Object getAxisName(String key){
diff --git a/src/main/java/org/apache/xpath/compiler/OpCodes.java b/src/main/java/org/apache/xpath/compiler/OpCodes.java
index f29bfd722..2916f3efa 100644
--- a/src/main/java/org/apache/xpath/compiler/OpCodes.java
+++ b/src/main/java/org/apache/xpath/compiler/OpCodes.java
@@ -550,6 +550,11 @@ public class OpCodes
    * @xsl.usage advanced
    */
   public static final int NODETYPE_FUNCTEST = 1034;
+  
+  /**
+   * Added for XSLT 3.0
+   */
+  public static final int NODETYPE_CONTEXT_ITEM = 1035;
 
   /**
    * [FROM_stepType]
diff --git a/src/main/java/org/apache/xpath/compiler/XPathParser.java b/src/main/java/org/apache/xpath/compiler/XPathParser.java
index 2d2e0e7e8..8e9737f6b 100644
--- a/src/main/java/org/apache/xpath/compiler/XPathParser.java
+++ b/src/main/java/org/apache/xpath/compiler/XPathParser.java
@@ -4579,9 +4579,23 @@ public class XPathParser
         consumeExpected(')');
       }
     }
-    else
+    else if (tokenIs('.')) 
     {
+    	// Added for XSLT 3.0
+    	
+    	// This has been implemented to handle XSL match pattern 
+    	// strings, that represent XDM atomic values.
+    	Object nodeTestOp = Keywords.getNodeType(m_token);
+    	
+    	int nt = ((Integer) nodeTestOp).intValue();
 
+        m_ops.setOp(m_ops.getOp(OpMap.MAPINDEX_LENGTH), nt);
+        m_ops.setOp(OpMap.MAPINDEX_LENGTH, m_ops.getOp(OpMap.MAPINDEX_LENGTH) + 1);
+        
+        consumeExpected('.');
+    }
+    else
+    {
       // Assume name of attribute or element.
       m_ops.setOp(m_ops.getOp(OpMap.MAPINDEX_LENGTH), OpCodes.NODENAME);
       m_ops.setOp(OpMap.MAPINDEX_LENGTH, m_ops.getOp(OpMap.MAPINDEX_LENGTH) + 1);
diff --git a/src/test/java/org/apache/xalan/tests/xslt3/XslTemplateTests.java b/src/test/java/org/apache/xalan/tests/xslt3/XslTemplateTests.java
index b1e3ec49f..abc8a61db 100644
--- a/src/test/java/org/apache/xalan/tests/xslt3/XslTemplateTests.java
+++ b/src/test/java/org/apache/xalan/tests/xslt3/XslTemplateTests.java
@@ -147,5 +147,45 @@ public class XslTemplateTests extends XSLTransformTestsUtil {
         
         runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
     }
+    
+    @Test
+    public void xslTemplateTest11() {
+        String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test11.xsl"; 
+        String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test11.xsl";
+        
+        String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test10.out";                
+        
+        runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+    }
+    
+    @Test
+    public void xslTemplateTest12() {
+        String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test12.xsl"; 
+        String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test12.xsl";
+        
+        String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test11.out";                
+        
+        runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+    }
+    
+    @Test
+    public void xslTemplateTest13() {
+        String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test13.xsl"; 
+        String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test13.xsl";
+        
+        String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test12.out";                
+        
+        runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+    }
+    
+    @Test
+    public void xslTemplateTest14() {
+        String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test14.xsl"; 
+        String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test14.xsl";
+        
+        String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test13.out";                
+        
+        runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+    }
 
 }
diff --git a/src/test/resources/xsl_template/gold/test10.out b/src/test/resources/xsl_template/gold/test10.out
new file mode 100644
index 000000000..ea4d8b7d1
--- /dev/null
+++ b/src/test/resources/xsl_template/gold/test10.out
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?><result>
+  <value>hello</value>
+</result>
diff --git a/src/test/resources/xsl_template/gold/test11.out b/src/test/resources/xsl_template/gold/test11.out
new file mode 100644
index 000000000..c9dfa91be
--- /dev/null
+++ b/src/test/resources/xsl_template/gold/test11.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><result>
+  <value>1</value>
+  <value>2</value>
+  <value>3</value>
+  <value>4</value>
+</result>
diff --git a/src/test/resources/xsl_template/gold/test12.out b/src/test/resources/xsl_template/gold/test12.out
new file mode 100644
index 000000000..afaf4b6a2
--- /dev/null
+++ b/src/test/resources/xsl_template/gold/test12.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><result>
+  <value>xs:integer : 1</value>
+  <value>xs:date : 2005-10-05</value>
+  <value>xs:date : 1995-04-12</value>
+  <value>xs:integer : 4</value>
+</result>
diff --git a/src/test/resources/xsl_template/gold/test13.out b/src/test/resources/xsl_template/gold/test13.out
new file mode 100644
index 000000000..7166096bd
--- /dev/null
+++ b/src/test/resources/xsl_template/gold/test13.out
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><result>
+  <info number="1">1</info>
+  <info number="2">4</info>
+  <info number="3">9</info>
+  <info number="4">16</info>
+</result>
diff --git a/src/test/resources/xsl_template/test11.xsl b/src/test/resources/xsl_template/test11.xsl
new file mode 100644
index 000000000..506f1aafe
--- /dev/null
+++ b/src/test/resources/xsl_template/test11.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+			    version="3.0">
+				
+  <!-- Author: mukulg@apache.org -->
+
+  <!--  An XSL 3 stylesheet test case, to test xsl:template match 
+        with pattern ".". This stylesheet also tests providing an 
+		XDM atomic value to the called template. --> 
+
+  <xsl:output method="xml" indent="yes"/>
+
+  <xsl:template match="/">
+      <result>
+	     <xsl:apply-templates select="'hello'"/>
+	  </result>
+  </xsl:template>
+  
+  <xsl:template match=".">
+    <value><xsl:value-of select="."/></value>
+  </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/src/test/resources/xsl_template/test12.xsl b/src/test/resources/xsl_template/test12.xsl
new file mode 100644
index 000000000..0ae148b2e
--- /dev/null
+++ b/src/test/resources/xsl_template/test12.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:xs="http://www.w3.org/2001/XMLSchema"
+				exclude-result-prefixes="xs"
+			    version="3.0">
+				
+  <!-- Author: mukulg@apache.org -->
+
+  <!--  An XSL 3 stylesheet test case, to test xsl:template match 
+        with pattern ".". This stylesheet also tests providing a 
+		sequence of XDM atomic value to the called template. -->  
+
+  <xsl:output method="xml" indent="yes"/>
+
+  <xsl:template match="/">
+      <result>
+	     <xsl:apply-templates select="(xs:integer(1), xs:integer(2), xs:integer(3), xs:integer(4))"/>
+	  </result>
+  </xsl:template>
+  
+  <xsl:template match=".">
+    <value><xsl:value-of select="."/></value>
+  </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/src/test/resources/xsl_template/test13.xsl b/src/test/resources/xsl_template/test13.xsl
new file mode 100644
index 000000000..0374d3ce5
--- /dev/null
+++ b/src/test/resources/xsl_template/test13.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:xs="http://www.w3.org/2001/XMLSchema"
+				exclude-result-prefixes="xs"
+			    version="3.0">
+				
+  <!-- Author: mukulg@apache.org --> 
+
+  <!--  An XSL 3 stylesheet test case, to test xsl:template match 
+        with pattern ".". This stylesheet also tests providing a 
+		sequence of XDM atomic value to the called template. -->    
+
+  <xsl:output method="xml" indent="yes"/>
+  
+  <xsl:template match="/">
+      <result>
+	     <xsl:apply-templates select="(xs:integer(1), xs:date('2005-10-05'), xs:date('1995-04-12'), xs:integer(4))"/>
+	  </result>
+  </xsl:template>
+  
+  <xsl:template match=".">
+    <xsl:variable name="var1" select="."/>
+	<xsl:choose>
+	   <xsl:when test="$var1 instance of xs:integer">
+	      <value><xsl:value-of select="'xs:integer : ' || $var1"/></value>
+	   </xsl:when>
+	   <xsl:when test="$var1 instance of xs:date">
+	      <value><xsl:value-of select="'xs:date : ' || $var1"/></value>
+	   </xsl:when>
+	   <xsl:otherwise>
+	      <value><xsl:value-of select="'anotherXsType : ' || $var1"/></value>
+	   </xsl:otherwise>
+	</xsl:choose>
+  </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/src/test/resources/xsl_template/test14.xsl b/src/test/resources/xsl_template/test14.xsl
new file mode 100644
index 000000000..b2eaa6614
--- /dev/null
+++ b/src/test/resources/xsl_template/test14.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:xs="http://www.w3.org/2001/XMLSchema"
+				exclude-result-prefixes="xs"
+			    version="3.0">
+				
+  <!-- Author: mukulg@apache.org -->
+
+  <!--  An XSL 3 stylesheet test case, to test xsl:template match 
+        with pattern ".". This stylesheet also tests providing a 
+		sequence of XDM atomic value to the called template. -->   
+
+  <xsl:output method="xml" indent="yes"/>
+
+  <xsl:template match="/">
+      <result>
+	     <xsl:apply-templates select="(xs:integer(1), xs:integer(2), xs:integer(3), xs:integer(4))"/>
+	  </result>
+  </xsl:template>
+  
+  <xsl:template match=".">
+    <xsl:variable name="num1" select="." as="xs:integer"/>
+    <info number="{$num1}"><xsl:value-of select="$num1 * $num1"/></info>
+  </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