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/08/14 16:43:37 UTC

[xalan-java] branch xalan-j_xslt3.0 updated: committing implementation of xpath 3.1 functions fn:codepoints-to-string, fn:string-to-codepoints, and few new related working test cases as well. adding and modifying few other working xslt 3.0 test cases as well. this commit also implements an enhancement, where xpath 3.1 function call arguments may be an xpath expression () (denoting an xpath empty sequence).

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

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


The following commit(s) were added to refs/heads/xalan-j_xslt3.0 by this push:
     new cfeecf47 committing implementation of xpath 3.1 functions fn:codepoints-to-string, fn:string-to-codepoints, and few new related working test cases as well. adding and modifying few other working xslt 3.0 test cases as well. this commit also implements an enhancement, where xpath 3.1 function call arguments may be an xpath expression () (denoting an xpath empty sequence).
     new bad0d715 Merge pull request #51 from mukulga/xalan-j_xslt3.0_mukul
cfeecf47 is described below

commit cfeecf4749893519c82a10f2b61989d473e9f1e8
Author: Mukul Gandhi <ga...@gmail.com>
AuthorDate: Mon Aug 14 22:01:52 2023 +0530

    committing implementation of xpath 3.1 functions fn:codepoints-to-string, fn:string-to-codepoints, and few new related working test cases as well. adding and modifying few other working xslt 3.0 test cases as well. this commit also implements an enhancement, where xpath 3.1 function call arguments may be an xpath expression () (denoting an xpath empty sequence).
---
 src/org/apache/xalan/templates/ElemIterate.java    |   4 +-
 src/org/apache/xpath/compiler/FunctionTable.java   |  20 ++-
 src/org/apache/xpath/compiler/Keywords.java        |   6 +
 src/org/apache/xpath/compiler/XPathParser.java     |  24 ++-
 .../xpath/functions/FuncCodePointsToString.java    | 190 +++++++++++++++++++++
 src/org/apache/xpath/functions/FuncSort.java       |   6 +-
 .../xpath/functions/FuncStringToCodepoints.java    |  71 ++++++++
 tests/fn_codepoints_to_string/gold/test1.out       |   4 +
 tests/fn_codepoints_to_string/gold/test2.out       |   4 +
 .../test1.xsl}                                     |  19 ++-
 tests/fn_codepoints_to_string/test1_a.xml          |   7 +
 .../{fn_sort => fn_codepoints_to_string}/test2.xsl |  13 +-
 tests/fn_fold_left/test1.xsl                       |   4 +-
 tests/fn_sort/gold/test4.out                       |  10 ++
 tests/fn_sort/gold/test5.out                       |  10 ++
 tests/fn_sort/test1.xsl                            |   6 +-
 tests/fn_sort/test1_c.xml                          |   7 +
 tests/fn_sort/test2.xsl                            |   6 +-
 tests/fn_sort/test3.xsl                            |   6 +-
 tests/fn_sort/{test3.xsl => test4.xsl}             |  24 +--
 tests/fn_sort/{test3.xsl => test5.xsl}             |  25 +--
 tests/fn_string_to_codepoints/gold/test1.out       |   4 +
 tests/fn_string_to_codepoints/gold/test2.out       |  10 ++
 .../test1.xsl}                                     |  20 +--
 tests/fn_string_to_codepoints/test1_a.xml          |   7 +
 .../{fn_sort => fn_string_to_codepoints}/test2.xsl |  17 +-
 tests/for_expr/gold/test15.out                     |   1 +
 tests/{fn_sort/test2.xsl => for_expr/test15.xsl}   |  22 +--
 ...rtTests.java => FnCodepointsToStringTests.java} |  22 +--
 tests/org/apache/xalan/xpath3/FnSortTests.java     |  20 +++
 ...rtTests.java => FnStringToCodepointsTests.java} |  22 +--
 tests/org/apache/xalan/xpath3/ForExprTests.java    |  10 ++
 tests/org/apache/xalan/xslt3/AllXsl3Tests.java     |   5 +-
 33 files changed, 505 insertions(+), 121 deletions(-)

diff --git a/src/org/apache/xalan/templates/ElemIterate.java b/src/org/apache/xalan/templates/ElemIterate.java
index a713c796..242e2a39 100644
--- a/src/org/apache/xalan/templates/ElemIterate.java
+++ b/src/org/apache/xalan/templates/ElemIterate.java
@@ -32,6 +32,7 @@ import org.apache.xpath.Expression;
 import org.apache.xpath.ExpressionOwner;
 import org.apache.xpath.XPath;
 import org.apache.xpath.XPathContext;
+import org.apache.xpath.functions.Function;
 import org.apache.xpath.objects.ResultSequence;
 import org.apache.xpath.objects.XObject;
 import org.apache.xpath.operations.Operation;
@@ -207,7 +208,8 @@ public class ElemIterate extends ElemTemplateElement implements ExpressionOwner
            // Evaluate xsl:iterate instruction, when value of its "select" attribute evaluates 
            // to a 'ResultSequence'. 
            if ((m_selectExpression instanceof Variable) || 
-                                                  (m_selectExpression instanceof Operation)) {
+                                                  (m_selectExpression instanceof Operation) || 
+                                                  (m_selectExpression instanceof Function)) {
                XObject  evalResult = m_selectExpression.execute(xctxt);
                if (evalResult instanceof ResultSequence) {
                    ResultSequence resultSeq = (ResultSequence)evalResult;
diff --git a/src/org/apache/xpath/compiler/FunctionTable.java b/src/org/apache/xpath/compiler/FunctionTable.java
index 2b27e26a..cf3a2567 100644
--- a/src/org/apache/xpath/compiler/FunctionTable.java
+++ b/src/org/apache/xpath/compiler/FunctionTable.java
@@ -263,6 +263,12 @@ public class FunctionTable
   
   /** The 'sort()' id. */
   public static final int FUNC_SORT = 79;
+  
+  /** The 'codepoints-to-string()' id. */
+  public static final int FUNC_CODE_POINTS_TO_STRING = 80;
+  
+  /** The 'string-to-codepoints()' id. */
+  public static final int FUNC_STRING_TO_CODE_POINTS = 81;
 
   // Proprietary
 
@@ -320,7 +326,7 @@ public class FunctionTable
    * Number of built in functions. Be sure to update this as
    * built-in functions are added.
    */
-  private static final int NUM_BUILT_IN_FUNCS = 80;
+  private static final int NUM_BUILT_IN_FUNCS = 82;
 
   /**
    * Number of built-in functions that may be added.
@@ -479,6 +485,11 @@ public class FunctionTable
       org.apache.xpath.functions.FuncMinutesFromDuration.class;
     m_functions[FUNC_SECONDS_FROM_DURATION] = 
       org.apache.xpath.functions.FuncSecondsFromDuration.class;
+    
+    m_functions[FUNC_CODE_POINTS_TO_STRING] = 
+      org.apache.xpath.functions.FuncCodePointsToString.class;
+    m_functions[FUNC_STRING_TO_CODE_POINTS] = 
+      org.apache.xpath.functions.FuncStringToCodepoints.class;
   }
 
   static{
@@ -644,7 +655,12 @@ public class FunctionTable
          m_functionID.put(Keywords.FUNC_MINUTES_FROM_DURATION,
                          new Integer(FunctionTable.FUNC_MINUTES_FROM_DURATION));
          m_functionID.put(Keywords.FUNC_SECONDS_FROM_DURATION,
-                         new Integer(FunctionTable.FUNC_SECONDS_FROM_DURATION));         
+                         new Integer(FunctionTable.FUNC_SECONDS_FROM_DURATION));
+         
+         m_functionID.put(Keywords.FUNC_CODE_POINTS_TO_STRING,
+                         new Integer(FunctionTable.FUNC_CODE_POINTS_TO_STRING));
+         m_functionID.put(Keywords.FUNC_STRING_TO_CODE_POINTS,
+                         new Integer(FunctionTable.FUNC_STRING_TO_CODE_POINTS));
   }
   
   public FunctionTable(){
diff --git a/src/org/apache/xpath/compiler/Keywords.java b/src/org/apache/xpath/compiler/Keywords.java
index 2ace7df2..483d3476 100644
--- a/src/org/apache/xpath/compiler/Keywords.java
+++ b/src/org/apache/xpath/compiler/Keywords.java
@@ -341,6 +341,12 @@ public class Keywords
   /** seconds-from-duration function string. */
   public static final String FUNC_SECONDS_FROM_DURATION = "seconds-from-duration";
   
+  /** codepoints-to-string function string. */
+  public static final String FUNC_CODE_POINTS_TO_STRING = "codepoints-to-string";
+  
+  /** string-to-codepoints function string. */
+  public static final String FUNC_STRING_TO_CODE_POINTS = "string-to-codepoints";
+  
   // XML Schema built-in data type name keywords
   
   /** xs:decimal data type string. */
diff --git a/src/org/apache/xpath/compiler/XPathParser.java b/src/org/apache/xpath/compiler/XPathParser.java
index 4aced74a..0668e2a8 100644
--- a/src/org/apache/xpath/compiler/XPathParser.java
+++ b/src/org/apache/xpath/compiler/XPathParser.java
@@ -2512,13 +2512,35 @@ public class XPathParser
    *
    * Argument    ::=    Expr
    *
-   *
    * @throws javax.xml.transform.TransformerException
    */
   protected void Argument() throws javax.xml.transform.TransformerException
   {
 
     int opPos = m_ops.getOp(OpMap.MAPINDEX_LENGTH);
+    
+    if (tokenIs('(') && lookahead(')', 1)) {
+        // handles the case, where the XPath expression (i.e, 
+        // function argument) is ().
+        
+        nextToken();
+        nextToken();                            
+        
+        insertOp(opPos, 2, OpCodes.OP_SEQUENCE_CONSTRUCTOR_EXPR);
+        
+        List<String> sequenceConstructorXPathParts = new ArrayList<String>(); 
+        
+        sequenceConstructorXPathParts.add(XPATH_EXPR_STR_EMPTY_SEQUENCE);
+        
+        fSimpleSequenceConstructor = new SimpleSequenceConstructor();              
+        fSimpleSequenceConstructor.setSequenceConstructorXPathParts(
+                                                              sequenceConstructorXPathParts);
+        
+        m_ops.setOp(opPos + OpMap.MAPINDEX_LENGTH, 
+                                            m_ops.getOp(OpMap.MAPINDEX_LENGTH) - opPos);
+        
+        return; 
+    }
 
     appendOp(2, OpCodes.OP_ARGUMENT);
     Expr();
diff --git a/src/org/apache/xpath/functions/FuncCodePointsToString.java b/src/org/apache/xpath/functions/FuncCodePointsToString.java
new file mode 100644
index 00000000..69ab7fc1
--- /dev/null
+++ b/src/org/apache/xpath/functions/FuncCodePointsToString.java
@@ -0,0 +1,190 @@
+/*
+ * 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.
+ */
+package org.apache.xpath.functions;
+
+import javax.xml.transform.SourceLocator;
+
+import org.apache.xml.dtm.DTM;
+import org.apache.xml.dtm.DTMIterator;
+import org.apache.xml.dtm.DTMManager;
+import org.apache.xpath.XPathContext;
+import org.apache.xpath.objects.ResultSequence;
+import org.apache.xpath.objects.XNodeSet;
+import org.apache.xpath.objects.XNumber;
+import org.apache.xpath.objects.XObject;
+import org.apache.xpath.objects.XString;
+import org.apache.xpath.operations.Variable;
+import org.apache.xpath.xs.types.XSNumericType;
+
+/**
+ * Implementation of the codepoints-to-string() function.
+ * 
+ * @author Mukul Gandhi <mu...@apache.org>
+ * 
+ * @xsl.usage advanced
+ */
+public class FuncCodePointsToString extends FunctionOneArg {
+
+    private static final long serialVersionUID = -4531182517520672452L;
+
+    public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
+    {
+        XObject result = null;                                
+        
+        String resultStr = "";
+        
+        if (m_arg0 instanceof Variable) {
+           XObject xObj = ((Variable)m_arg0).execute(xctxt);           
+           resultStr = getStringFromXObject(xObj, xctxt);           
+        }
+        else {
+           XObject xObj = m_arg0.execute(xctxt);
+           resultStr = getStringFromXObject(xObj, xctxt);
+        }
+        
+        result = new XString(resultStr);
+        
+        return result;
+    }
+    
+    /*
+     * Given an XObject object instance, convert that into a string, which is
+     * the result of function invocation fn:codepoints-to-string.
+     */
+    private String getStringFromXObject(XObject xObj, XPathContext xctxt) 
+                                                                 throws javax.xml.transform.TransformerException {
+       
+       String resultStr = "";
+       
+       SourceLocator srcLocator = xctxt.getSAXLocator();
+       
+       ResultSequence inpSeq = null;
+       
+       if (xObj instanceof ResultSequence) {
+           inpSeq = (ResultSequence)xObj;
+           for (int idx = 0; idx < inpSeq.size(); idx++) {
+              XObject inpSeqObj = inpSeq.item(idx);
+              if (inpSeqObj instanceof XNumber) {
+                 XNumber xNum = (XNumber)inpSeqObj;
+                 double dblVal = xNum.num();
+                 if (dblVal == (int)dblVal) {
+                    char[] charArr = Character.toChars((int)dblVal);
+                    resultStr = resultStr + String.valueOf(charArr);
+                 }
+                 else {
+                    throw new javax.xml.transform.TransformerException("FORG0006 : An input sequence item " + dblVal + " "
+                                                                                                + "is not an xs:integer value, "
+                                                                                                + "or cannot be cast to xs:integer.", srcLocator);    
+                 }
+              }
+              else if (inpSeqObj instanceof XSNumericType) {
+                 String itemStrVal = ((XSNumericType)inpSeqObj).stringValue();
+                 double dblVal = (Double.valueOf(itemStrVal)).doubleValue();
+                 if (dblVal == (int)dblVal) {
+                    char[] charArr = Character.toChars((int)dblVal);
+                    resultStr = resultStr + String.valueOf(charArr);  
+                 }
+                 else {
+                    throw new javax.xml.transform.TransformerException("FORG0006 : An input sequence item " + dblVal + " "
+                                                                                                  + "is not an xs:integer value, "
+                                                                                                  + "or cannot be cast to xs:integer.", srcLocator);   
+                 }
+              }
+              else if (inpSeqObj instanceof XNodeSet) {
+                 XNodeSet inpSeqItem = (XNodeSet)inpSeqObj;
+                 if (inpSeqItem.getLength() == 1) {
+                    String itemStrVal = inpSeqItem.str();
+                    double dblVal = (Double.valueOf(itemStrVal)).doubleValue();
+                    if (dblVal == (int)dblVal) {
+                       char[] charArr = Character.toChars((int)dblVal);
+                       resultStr = resultStr + String.valueOf(charArr); 
+                    }
+                    else {
+                       throw new javax.xml.transform.TransformerException("FORG0006 : An input sequence item " + dblVal + " "
+                                                                                                       + "is not an xs:integer value, "
+                                                                                                       + "or cannot be cast to xs:integer.", srcLocator);   
+                    }
+                 }
+                 else {
+                    throw new javax.xml.transform.TransformerException("FORG0006 : An input sequence item is a nodeset "
+                                                                                                       + "with size not equal to one.", srcLocator); 
+                 }
+              }
+              else {
+                 String itemStrVal = inpSeqObj.str();
+                 try {
+                    double dblVal = (Double.valueOf(itemStrVal)).doubleValue();
+                    if (dblVal == (int)dblVal) {
+                       char[] charArr = Character.toChars((int)dblVal);
+                       resultStr = resultStr + String.valueOf(charArr); 
+                    }
+                    else {
+                       throw new javax.xml.transform.TransformerException("FORG0006 : An input sequence item " + dblVal + " "
+                                                                                                           + "is not an xs:integer value, "
+                                                                                                           + "or cannot be cast to xs:integer.", srcLocator);   
+                    }
+                 }
+                 catch (NumberFormatException ex) {
+                    throw new javax.xml.transform.TransformerException("FORG0006 : An input sequence item, cannot be "
+                                                                                                + "cast to numeric value.", srcLocator);
+                 }
+              }
+           }
+        }
+        else if (xObj instanceof XNodeSet) {
+           DTMManager dtmMgr = (DTMManager)xctxt;
+            
+           XNodeSet xNodeSet = (XNodeSet)xObj;           
+           DTMIterator sourceNodes = xNodeSet.iter();
+            
+           int nextNodeDtmHandle;
+           
+           while ((nextNodeDtmHandle = sourceNodes.nextNode()) != DTM.NULL) {
+               XNodeSet xNodeSetItem = new XNodeSet(nextNodeDtmHandle, dtmMgr);
+               String nodeStrValue = xNodeSetItem.str();
+               
+               double dblVal = (Double.valueOf(nodeStrValue)).doubleValue();
+               if (dblVal == (int)dblVal) {
+                  char[] charArr = Character.toChars((int)dblVal);
+                  resultStr = resultStr + String.valueOf(charArr);  
+               }
+               else {
+                  throw new javax.xml.transform.TransformerException("FORG0006 : An input sequence item " + dblVal + " "
+                                                                                               + "is not an xs:integer value, "
+                                                                                               + "or cannot be cast to xs:integer.", srcLocator);   
+               }
+           }
+        }
+        else {
+           String xdmItemStrVal = xObj.str();
+           
+           double dblVal = (Double.valueOf(xdmItemStrVal)).doubleValue();
+           if (dblVal == (int)dblVal) {
+              char[] charArr = Character.toChars((int)dblVal);
+              resultStr = String.valueOf(charArr);  
+           }
+           else {
+              throw new javax.xml.transform.TransformerException("FORG0006 : An input sequence item " + dblVal + " "
+                                                                                                  + "is not an xs:integer value, "
+                                                                                                  + "or cannot be cast to xs:integer.", srcLocator);   
+           }
+        }
+       
+        return resultStr; 
+    }
+
+}
diff --git a/src/org/apache/xpath/functions/FuncSort.java b/src/org/apache/xpath/functions/FuncSort.java
index 975351e9..14b68a76 100644
--- a/src/org/apache/xpath/functions/FuncSort.java
+++ b/src/org/apache/xpath/functions/FuncSort.java
@@ -101,8 +101,8 @@ public class FuncSort extends FunctionMultiArgs
                                                                                      + "second argument to function call fn:sort, is "
                                                                                      + "not supported.", srcLocator);  
            }
-            
-           arg2 = m_arg2; 
+           
+           arg2 = m_arg2;
         }
         
         XObject xObjArg0 = null;
@@ -291,7 +291,7 @@ public class FuncSort extends FunctionMultiArgs
      */
     class FnSortComparator implements Comparator {
         
-        SourceLocator srcLocator;
+        private SourceLocator srcLocator;
         
         /*
          * The class constructor.
diff --git a/src/org/apache/xpath/functions/FuncStringToCodepoints.java b/src/org/apache/xpath/functions/FuncStringToCodepoints.java
new file mode 100644
index 00000000..b132c90b
--- /dev/null
+++ b/src/org/apache/xpath/functions/FuncStringToCodepoints.java
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+/*
+ * $Id$
+ */
+package org.apache.xpath.functions;
+
+import java.math.BigInteger;
+
+import org.apache.xpath.XPathContext;
+import org.apache.xpath.objects.ResultSequence;
+import org.apache.xpath.objects.XObject;
+import org.apache.xpath.xs.types.XSInteger;
+
+/**
+ * Implementation of the string-to-codepoints() function.
+ * 
+ * @author Mukul Gandhi <mu...@apache.org>
+ * 
+ * @xsl.usage advanced
+ */
+public class FuncStringToCodepoints extends FunctionDef1Arg
+{
+
+   private static final long serialVersionUID = -2509583274718320399L;
+
+  /**
+   * Execute the function. The function must return
+   * a valid object.
+   * 
+   * @param xctxt The current execution context.
+   * @return A valid XObject.
+   *
+   * @throws javax.xml.transform.TransformerException
+   */
+  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
+  {
+     
+     XObject result = null;
+     
+     String inpStr = (getArg0AsString(xctxt)).toString();
+     
+     int[] codePointsArr = (inpStr.codePoints()).toArray();
+     
+     ResultSequence resultSeq = new ResultSequence();
+     
+     for (int idx=0; idx < codePointsArr.length; idx++) {
+        long codepointVal = codePointsArr[idx]; 
+        resultSeq.add(new XSInteger(BigInteger.valueOf(codepointVal))); 
+     }
+     
+     result = resultSeq; 
+     
+     return result;
+  }
+}
diff --git a/tests/fn_codepoints_to_string/gold/test1.out b/tests/fn_codepoints_to_string/gold/test1.out
new file mode 100644
index 00000000..8575810b
--- /dev/null
+++ b/tests/fn_codepoints_to_string/gold/test1.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><result>
+  <one>BACH</one>
+  <two/>
+</result>
diff --git a/tests/fn_codepoints_to_string/gold/test2.out b/tests/fn_codepoints_to_string/gold/test2.out
new file mode 100644
index 00000000..ff1105d7
--- /dev/null
+++ b/tests/fn_codepoints_to_string/gold/test2.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><result>
+  <one>BACH</one>
+  <two>BACH</two>
+</result>
diff --git a/tests/fn_sort/test2.xsl b/tests/fn_codepoints_to_string/test1.xsl
similarity index 67%
copy from tests/fn_sort/test2.xsl
copy to tests/fn_codepoints_to_string/test1.xsl
index 7c63f689..d818aa6b 100644
--- a/tests/fn_sort/test2.xsl
+++ b/tests/fn_codepoints_to_string/test1.xsl
@@ -4,19 +4,20 @@
                 
    <!-- Author: mukulg@apache.org -->
    
-   <!-- use with test1_a.xml -->
-   
-   <!-- An XSLT stylesheet test case, to test XPath 3.1 fn:sort function,
-        by reading input data from an XML external source document. -->                
+   <!-- An XSLT stylesheet test, to test the XPath 3.1 fn:codepoints-to-string() 
+        function.
+        
+        The XPath expression examples for function fn:codepoints-to-string(),
+        used within this stylesheet are borrowed from XPath 3.1 spec. 
+   -->                
 
    <xsl:output method="xml" indent="yes"/>
    
-   <xsl:variable name="emptySeq" select="()"/>
-   
-   <xsl:template match="/temp">
+   <xsl:template match="/">
       <result>
-         <one><xsl:value-of select="sort(a, $emptySeq, function($a) { abs($a) })"/></one>
-         <two><xsl:value-of select="sort(data/@*, $emptySeq, function($val) { abs($val) })"/></two>
+         <xsl:variable name="codepointsSeq1" select="(66, 65, 67, 72)"/>
+         <one><xsl:value-of select="codepoints-to-string($codepointsSeq1)"/></one>
+         <two><xsl:value-of select="codepoints-to-string(())"/></two>
       </result>
    </xsl:template>
    
diff --git a/tests/fn_codepoints_to_string/test1_a.xml b/tests/fn_codepoints_to_string/test1_a.xml
new file mode 100644
index 00000000..7b3cebd8
--- /dev/null
+++ b/tests/fn_codepoints_to_string/test1_a.xml
@@ -0,0 +1,7 @@
+<document>  
+  <a>66</a>
+  <a>65</a>
+  <a>67</a>
+  <a>72</a>
+  <data val1="66" val2="65" val3="67" val4="72"/>
+</document>
\ No newline at end of file
diff --git a/tests/fn_sort/test2.xsl b/tests/fn_codepoints_to_string/test2.xsl
similarity index 72%
copy from tests/fn_sort/test2.xsl
copy to tests/fn_codepoints_to_string/test2.xsl
index 7c63f689..42551127 100644
--- a/tests/fn_sort/test2.xsl
+++ b/tests/fn_codepoints_to_string/test2.xsl
@@ -6,17 +6,16 @@
    
    <!-- use with test1_a.xml -->
    
-   <!-- An XSLT stylesheet test case, to test XPath 3.1 fn:sort function,
-        by reading input data from an XML external source document. -->                
+   <!-- An XSLT stylesheet test, to test the XPath 3.1 fn:codepoints-to-string() 
+        function. This stylesheet, gets input data from an XML external source 
+        document. -->                 
 
    <xsl:output method="xml" indent="yes"/>
    
-   <xsl:variable name="emptySeq" select="()"/>
-   
-   <xsl:template match="/temp">
+   <xsl:template match="/document">
       <result>
-         <one><xsl:value-of select="sort(a, $emptySeq, function($a) { abs($a) })"/></one>
-         <two><xsl:value-of select="sort(data/@*, $emptySeq, function($val) { abs($val) })"/></two>
+         <one><xsl:value-of select="codepoints-to-string(a)"/></one>
+         <two><xsl:value-of select="codepoints-to-string(data/@*)"/></two>
       </result>
    </xsl:template>
    
diff --git a/tests/fn_fold_left/test1.xsl b/tests/fn_fold_left/test1.xsl
index dd3f7569..4a7ecb6f 100644
--- a/tests/fn_fold_left/test1.xsl
+++ b/tests/fn_fold_left/test1.xsl
@@ -13,8 +13,6 @@
    <xsl:output method="xml" indent="yes"/>
    
    <xsl:variable name="fnAdd" select="function($arg1, $arg2) { $arg1 + $arg2 }"/>
-   
-   <xsl:variable name="emptySeq" select="()"/>
       
    <xsl:template match="/">      
       <result>
@@ -55,7 +53,7 @@
         
         <!-- The fold-left function call below, reverses the order of xdm items within an input 
              sequence. -->
-        <val8><xsl:value-of select="fold-left(1 to 5, $emptySeq, function($a, $b) { ($b, $a) })"/></val8>
+        <val8><xsl:value-of select="fold-left(1 to 5, (), function($a, $b) { ($b, $a) })"/></val8>
         
         <!-- with this fold-left function call example, an inline function concatenates '$arg1' with 
              '$arg2', with a base value of 'z'. i.e, the following evaluation is performed :
diff --git a/tests/fn_sort/gold/test4.out b/tests/fn_sort/gold/test4.out
new file mode 100644
index 00000000..5a08a134
--- /dev/null
+++ b/tests/fn_sort/gold/test4.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?><document>
+  <val>-3.2</val>
+  <val>1</val>
+  <val>2</val>
+  <val>2.5</val>
+  <val>3</val>
+  <val>4</val>
+  <val>5</val>
+  <val>7</val>
+</document>
diff --git a/tests/fn_sort/gold/test5.out b/tests/fn_sort/gold/test5.out
new file mode 100644
index 00000000..bb2649c5
--- /dev/null
+++ b/tests/fn_sort/gold/test5.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?><document>
+  <val>7</val>
+  <val>5</val>
+  <val>4</val>
+  <val>3</val>
+  <val>2.5</val>
+  <val>2</val>
+  <val>1</val>
+  <val>-3.2</val>
+</document>
diff --git a/tests/fn_sort/test1.xsl b/tests/fn_sort/test1.xsl
index 4c7b8c72..c7dd8db6 100644
--- a/tests/fn_sort/test1.xsl
+++ b/tests/fn_sort/test1.xsl
@@ -14,15 +14,13 @@
    <xsl:variable name="seq1" select="(1, 4, 6, 5, 3)"/>
    <xsl:variable name="seq2" select="(1, -2, 5, 10, -10, 10, 8)"/>
    
-   <xsl:variable name="emptySeq" select="()"/>
-   
    <xsl:template match="/">
       <result>
         <one><xsl:value-of select="sort($seq1)"/></one>
                  
-        <two><xsl:value-of select="sort($seq2, $emptySeq, function($a) { abs($a) })"/></two>
+        <two><xsl:value-of select="sort($seq2, (), function($a) { abs($a) })"/></two>
         
-        <three><xsl:value-of select="sort($seq2, $emptySeq)"/></three>
+        <three><xsl:value-of select="sort($seq2, ())"/></three>
         
         <four><xsl:value-of select="sort($seq2)"/></four>
       </result>
diff --git a/tests/fn_sort/test1_c.xml b/tests/fn_sort/test1_c.xml
new file mode 100644
index 00000000..d12f0eb2
--- /dev/null
+++ b/tests/fn_sort/test1_c.xml
@@ -0,0 +1,7 @@
+<document>  
+  <a>5</a>
+  <a>2</a>
+  <a>4</a>
+  <a>1</a>
+  <data val1="2.5" val2="-3.2" val3="3" val4="7"/>
+</document>
\ No newline at end of file
diff --git a/tests/fn_sort/test2.xsl b/tests/fn_sort/test2.xsl
index 7c63f689..e5821b6a 100644
--- a/tests/fn_sort/test2.xsl
+++ b/tests/fn_sort/test2.xsl
@@ -11,12 +11,10 @@
 
    <xsl:output method="xml" indent="yes"/>
    
-   <xsl:variable name="emptySeq" select="()"/>
-   
    <xsl:template match="/temp">
       <result>
-         <one><xsl:value-of select="sort(a, $emptySeq, function($a) { abs($a) })"/></one>
-         <two><xsl:value-of select="sort(data/@*, $emptySeq, function($val) { abs($val) })"/></two>
+         <one><xsl:value-of select="sort(a, (), function($a) { abs($a) })"/></one>
+         <two><xsl:value-of select="sort(data/@*, (), function($val) { abs($val) })"/></two>
       </result>
    </xsl:template>
    
diff --git a/tests/fn_sort/test3.xsl b/tests/fn_sort/test3.xsl
index 5818703b..462d0a3a 100644
--- a/tests/fn_sort/test3.xsl
+++ b/tests/fn_sort/test3.xsl
@@ -12,15 +12,13 @@
         This stylesheet, sorts a sequence of XML person elements by last name 
         as the major sort key and first name as the minor sort key, using the 
         default collation.
-    -->                
+   -->                
 
    <xsl:output method="xml" indent="yes"/>
    
-   <xsl:variable name="emptySeq" select="()"/>
-   
    <xsl:template match="/document">
       <document>       
-         <xsl:copy-of select="sort(person, $emptySeq, function($person) { $person/lName || ':' || $person/fName })"/>
+         <xsl:copy-of select="sort(person, (), function($person) { $person/lName || ':' || $person/fName })"/>
       </document>
    </xsl:template>
    
diff --git a/tests/fn_sort/test3.xsl b/tests/fn_sort/test4.xsl
similarity index 71%
copy from tests/fn_sort/test3.xsl
copy to tests/fn_sort/test4.xsl
index 5818703b..a3fcf935 100644
--- a/tests/fn_sort/test3.xsl
+++ b/tests/fn_sort/test4.xsl
@@ -4,23 +4,27 @@
                 
    <!-- Author: mukulg@apache.org -->
    
-   <!-- use with test1_b.xml -->
+   <!-- use with test1_c.xml -->
    
    <!-- An XSLT stylesheet test case, to test XPath 3.1 fn:sort function,
-        by reading input data from an XML external source document. 
+        by reading input data from an XML external source document.
         
-        This stylesheet, sorts a sequence of XML person elements by last name 
-        as the major sort key and first name as the minor sort key, using the 
-        default collation.
-    -->                
+        The fn:sort function call result, produced by this stylesheet,
+        is in the ascending order.
+        
+        This stylesheet example, post processes the result of fn:sort
+        function call, by the xsl:iterate instruction.
+   -->                
 
    <xsl:output method="xml" indent="yes"/>
    
-   <xsl:variable name="emptySeq" select="()"/>
-   
    <xsl:template match="/document">
-      <document>       
-         <xsl:copy-of select="sort(person, $emptySeq, function($person) { $person/lName || ':' || $person/fName })"/>
+      <document>
+        <xsl:iterate select="sort((a | data/@*), (), function($val) { number($val) })">
+          <val>
+            <xsl:value-of select="."/>
+          </val>        
+        </xsl:iterate>
       </document>
    </xsl:template>
    
diff --git a/tests/fn_sort/test3.xsl b/tests/fn_sort/test5.xsl
similarity index 68%
copy from tests/fn_sort/test3.xsl
copy to tests/fn_sort/test5.xsl
index 5818703b..cb7a4ac8 100644
--- a/tests/fn_sort/test3.xsl
+++ b/tests/fn_sort/test5.xsl
@@ -4,23 +4,28 @@
                 
    <!-- Author: mukulg@apache.org -->
    
-   <!-- use with test1_b.xml -->
+   <!-- use with test1_c.xml -->
    
    <!-- An XSLT stylesheet test case, to test XPath 3.1 fn:sort function,
-        by reading input data from an XML external source document. 
+        by reading input data from an XML external source document.
         
-        This stylesheet, sorts a sequence of XML person elements by last name 
-        as the major sort key and first name as the minor sort key, using the 
-        default collation.
-    -->                
+        The fn:sort function call result, produced by this stylesheet,
+        is in the descending order, because fn:sort function call
+        specifies an XPath sort key expression as -1 * number(..). 
+        
+        This stylesheet example, post processes the result of fn:sort
+        function call, by the xsl:iterate instruction.
+   -->                
 
    <xsl:output method="xml" indent="yes"/>
    
-   <xsl:variable name="emptySeq" select="()"/>
-   
    <xsl:template match="/document">
-      <document>       
-         <xsl:copy-of select="sort(person, $emptySeq, function($person) { $person/lName || ':' || $person/fName })"/>
+      <document>
+        <xsl:iterate select="sort((a | data/@*), (), function($val) { -1 * number($val) })">
+          <val>
+            <xsl:value-of select="."/>
+          </val>        
+        </xsl:iterate>
       </document>
    </xsl:template>
    
diff --git a/tests/fn_string_to_codepoints/gold/test1.out b/tests/fn_string_to_codepoints/gold/test1.out
new file mode 100644
index 00000000..c13a128b
--- /dev/null
+++ b/tests/fn_string_to_codepoints/gold/test1.out
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?><result>
+  <one>84 104 233 114 232 115 101</one>
+  <two>66 65 67 72</two>
+</result>
diff --git a/tests/fn_string_to_codepoints/gold/test2.out b/tests/fn_string_to_codepoints/gold/test2.out
new file mode 100644
index 00000000..e35e97c0
--- /dev/null
+++ b/tests/fn_string_to_codepoints/gold/test2.out
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?><result>
+  <codepoints inpStr="hello">104 101 108 108 111</codepoints>
+  <codepoints inpStr="there">116 104 101 114 101</codepoints>
+  <codepoints inpStr="this">116 104 105 115</codepoints>
+  <codepoints inpStr="is">105 115</codepoints>
+  <codepoints inpStr="an">97 110</codepoints>
+  <codepoints inpStr="xml">120 109 108</codepoints>
+  <codepoints inpStr="test">116 101 115 116</codepoints>
+  <codepoints inpStr="document">100 111 99 117 109 101 110 116</codepoints>
+</result>
diff --git a/tests/fn_sort/test2.xsl b/tests/fn_string_to_codepoints/test1.xsl
similarity index 68%
copy from tests/fn_sort/test2.xsl
copy to tests/fn_string_to_codepoints/test1.xsl
index 7c63f689..fc6bdb08 100644
--- a/tests/fn_sort/test2.xsl
+++ b/tests/fn_string_to_codepoints/test1.xsl
@@ -1,22 +1,22 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="ISO-8859-1"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 version="3.0">
                 
    <!-- Author: mukulg@apache.org -->
    
-   <!-- use with test1_a.xml -->
-   
-   <!-- An XSLT stylesheet test case, to test XPath 3.1 fn:sort function,
-        by reading input data from an XML external source document. -->                
+   <!-- An XSLT stylesheet test, to test the XPath 3.1 fn:string-to-codepoints() 
+        function.
+        
+        The XPath expression examples for function fn:string-to-codepoints(),
+        used within this stylesheet are borrowed from XPath 3.1 spec. 
+   -->                
 
    <xsl:output method="xml" indent="yes"/>
    
-   <xsl:variable name="emptySeq" select="()"/>
-   
-   <xsl:template match="/temp">
+   <xsl:template match="/">
       <result>
-         <one><xsl:value-of select="sort(a, $emptySeq, function($a) { abs($a) })"/></one>
-         <two><xsl:value-of select="sort(data/@*, $emptySeq, function($val) { abs($val) })"/></two>
+         <one><xsl:value-of select="string-to-codepoints('Th�r�se')"/></one>
+         <two><xsl:value-of select="string-to-codepoints('BACH')"/></two>
       </result>
    </xsl:template>
    
diff --git a/tests/fn_string_to_codepoints/test1_a.xml b/tests/fn_string_to_codepoints/test1_a.xml
new file mode 100644
index 00000000..771e4745
--- /dev/null
+++ b/tests/fn_string_to_codepoints/test1_a.xml
@@ -0,0 +1,7 @@
+<document>  
+  <a>hello</a>
+  <a>there</a>
+  <a>this</a>
+  <a>is</a>
+  <data val1="an" val2="xml" val3="test" val4="document"/>
+</document>
\ No newline at end of file
diff --git a/tests/fn_sort/test2.xsl b/tests/fn_string_to_codepoints/test2.xsl
similarity index 67%
copy from tests/fn_sort/test2.xsl
copy to tests/fn_string_to_codepoints/test2.xsl
index 7c63f689..f6f575fd 100644
--- a/tests/fn_sort/test2.xsl
+++ b/tests/fn_string_to_codepoints/test2.xsl
@@ -6,17 +6,20 @@
    
    <!-- use with test1_a.xml -->
    
-   <!-- An XSLT stylesheet test case, to test XPath 3.1 fn:sort function,
-        by reading input data from an XML external source document. -->                
+   <!-- An XSLT stylesheet test, to test the XPath 3.1 fn:string-to-codepoints() 
+        function. This stylesheet, gets input data from an XML external source 
+        document. -->                
 
    <xsl:output method="xml" indent="yes"/>
    
-   <xsl:variable name="emptySeq" select="()"/>
-   
-   <xsl:template match="/temp">
+   <xsl:template match="/document">
       <result>
-         <one><xsl:value-of select="sort(a, $emptySeq, function($a) { abs($a) })"/></one>
-         <two><xsl:value-of select="sort(data/@*, $emptySeq, function($val) { abs($val) })"/></two>
+         <xsl:for-each select="a">
+            <codepoints inpStr="{.}"><xsl:value-of select="string-to-codepoints(.)"/></codepoints>
+         </xsl:for-each>
+         <xsl:for-each select="data/@*">
+            <codepoints inpStr="{.}"><xsl:value-of select="string-to-codepoints(.)"/></codepoints>
+         </xsl:for-each>
       </result>
    </xsl:template>
    
diff --git a/tests/for_expr/gold/test15.out b/tests/for_expr/gold/test15.out
new file mode 100644
index 00000000..1aa0fb5e
--- /dev/null
+++ b/tests/for_expr/gold/test15.out
@@ -0,0 +1 @@
+o l l e h
\ No newline at end of file
diff --git a/tests/fn_sort/test2.xsl b/tests/for_expr/test15.xsl
similarity index 63%
copy from tests/fn_sort/test2.xsl
copy to tests/for_expr/test15.xsl
index 7c63f689..2a536740 100644
--- a/tests/fn_sort/test2.xsl
+++ b/tests/for_expr/test15.xsl
@@ -2,22 +2,18 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 version="3.0">
                 
-   <!-- Author: mukulg@apache.org -->
+   <!-- Author: mukulg@apache.org -->               
    
-   <!-- use with test1_a.xml -->
-   
-   <!-- An XSLT stylesheet test case, to test XPath 3.1 fn:sort function,
-        by reading input data from an XML external source document. -->                
+   <!-- An XSLT stylesheet test, to test the evaluation of an 
+        XPath 3.1 "for" expression. The XPath "for" expression
+        illustrated within this stylesheet, produces a string
+        by reversing the characters of a given input string. -->                
 
-   <xsl:output method="xml" indent="yes"/>
-   
-   <xsl:variable name="emptySeq" select="()"/>
+   <xsl:output method="text"/>
    
-   <xsl:template match="/temp">
-      <result>
-         <one><xsl:value-of select="sort(a, $emptySeq, function($a) { abs($a) })"/></one>
-         <two><xsl:value-of select="sort(data/@*, $emptySeq, function($val) { abs($val) })"/></two>
-      </result>
+   <xsl:template match="/">
+      <xsl:variable name="str" select="'hello'"/>
+      <xsl:value-of select="for $idx in (-1 * string-length($str)) to -1 return substring($str, -1 * $idx, 1)"/>
    </xsl:template>
    
    <!--
diff --git a/tests/org/apache/xalan/xpath3/FnSortTests.java b/tests/org/apache/xalan/xpath3/FnCodepointsToStringTests.java
similarity index 78%
copy from tests/org/apache/xalan/xpath3/FnSortTests.java
copy to tests/org/apache/xalan/xpath3/FnCodepointsToStringTests.java
index 3fb17ee9..91ddbf1e 100644
--- a/tests/org/apache/xalan/xpath3/FnSortTests.java
+++ b/tests/org/apache/xalan/xpath3/FnCodepointsToStringTests.java
@@ -23,19 +23,19 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 /**
- * XPath 3.1 function fn:sort test cases.
+ * XPath 3.1 function fn:codepoints-to-string test cases.
  * 
  * @author Mukul Gandhi <mu...@apache.org>
  * 
  * @xsl.usage advanced
  */
-public class FnSortTests extends XslTransformTestsUtil {        
+public class FnCodepointsToStringTests extends XslTransformTestsUtil {        
     
     private static final String XSL_TRANSFORM_INPUT_DIRPATH = XSLConstants.XSL_TRANSFORM_INPUT_DIRPATH_PREFIX + 
-                                                                                                           "fn_sort/";
+                                                                                                    "fn_codepoints_to_string/";
     
     private static final String XSL_TRANSFORM_GOLD_DIRPATH = XSLConstants.XSL_TRANSFORM_GOLD_DIRPATH_PREFIX + 
-                                                                                                           "fn_sort/gold/";
+                                                                                                    "fn_codepoints_to_string/gold/";
 
     @BeforeClass
     public static void setUpBeforeClass() throws Exception {
@@ -50,7 +50,7 @@ public class FnSortTests extends XslTransformTestsUtil {
     }
 
     @Test
-    public void xslFnSortTest1() {
+    public void xslFnCodepointsToStringTest1() {
         String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test1.xsl"; 
         String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test1.xsl";
         
@@ -60,7 +60,7 @@ public class FnSortTests extends XslTransformTestsUtil {
     }
     
     @Test
-    public void xslFnSortTest2() {
+    public void xslFnCodepointsToStringTest2() {
         String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test1_a.xml"; 
         String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test2.xsl";
         
@@ -68,15 +68,5 @@ public class FnSortTests extends XslTransformTestsUtil {
         
         runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
     }
-    
-    @Test
-    public void xslFnSortTest3() {
-        String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test1_b.xml"; 
-        String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test3.xsl";
-        
-        String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test3.out";                
-        
-        runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
-    }
 
 }
diff --git a/tests/org/apache/xalan/xpath3/FnSortTests.java b/tests/org/apache/xalan/xpath3/FnSortTests.java
index 3fb17ee9..8e2cfe54 100644
--- a/tests/org/apache/xalan/xpath3/FnSortTests.java
+++ b/tests/org/apache/xalan/xpath3/FnSortTests.java
@@ -78,5 +78,25 @@ public class FnSortTests extends XslTransformTestsUtil {
         
         runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
     }
+    
+    @Test
+    public void xslFnSortTest4() {
+        String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test1_c.xml"; 
+        String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test4.xsl";
+        
+        String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test4.out";                
+        
+        runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+    }
+    
+    @Test
+    public void xslFnSortTest5() {
+        String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test1_c.xml"; 
+        String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test5.xsl";
+        
+        String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test5.out";                
+        
+        runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+    }
 
 }
diff --git a/tests/org/apache/xalan/xpath3/FnSortTests.java b/tests/org/apache/xalan/xpath3/FnStringToCodepointsTests.java
similarity index 78%
copy from tests/org/apache/xalan/xpath3/FnSortTests.java
copy to tests/org/apache/xalan/xpath3/FnStringToCodepointsTests.java
index 3fb17ee9..d82de1a9 100644
--- a/tests/org/apache/xalan/xpath3/FnSortTests.java
+++ b/tests/org/apache/xalan/xpath3/FnStringToCodepointsTests.java
@@ -23,19 +23,19 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 /**
- * XPath 3.1 function fn:sort test cases.
+ * XPath 3.1 function fn:string-to-codepoints test cases.
  * 
  * @author Mukul Gandhi <mu...@apache.org>
  * 
  * @xsl.usage advanced
  */
-public class FnSortTests extends XslTransformTestsUtil {        
+public class FnStringToCodepointsTests extends XslTransformTestsUtil {        
     
     private static final String XSL_TRANSFORM_INPUT_DIRPATH = XSLConstants.XSL_TRANSFORM_INPUT_DIRPATH_PREFIX + 
-                                                                                                           "fn_sort/";
+                                                                                                    "fn_string_to_codepoints/";
     
     private static final String XSL_TRANSFORM_GOLD_DIRPATH = XSLConstants.XSL_TRANSFORM_GOLD_DIRPATH_PREFIX + 
-                                                                                                           "fn_sort/gold/";
+                                                                                                    "fn_string_to_codepoints/gold/";
 
     @BeforeClass
     public static void setUpBeforeClass() throws Exception {
@@ -50,7 +50,7 @@ public class FnSortTests extends XslTransformTestsUtil {
     }
 
     @Test
-    public void xslFnSortTest1() {
+    public void xslFnStringToCodepointsTest1() {
         String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test1.xsl"; 
         String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test1.xsl";
         
@@ -60,7 +60,7 @@ public class FnSortTests extends XslTransformTestsUtil {
     }
     
     @Test
-    public void xslFnSortTest2() {
+    public void xslFnStringToCodepointsTest2() {
         String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test1_a.xml"; 
         String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test2.xsl";
         
@@ -68,15 +68,5 @@ public class FnSortTests extends XslTransformTestsUtil {
         
         runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
     }
-    
-    @Test
-    public void xslFnSortTest3() {
-        String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test1_b.xml"; 
-        String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test3.xsl";
-        
-        String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test3.out";                
-        
-        runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
-    }
 
 }
diff --git a/tests/org/apache/xalan/xpath3/ForExprTests.java b/tests/org/apache/xalan/xpath3/ForExprTests.java
index 40eabd48..6545844d 100644
--- a/tests/org/apache/xalan/xpath3/ForExprTests.java
+++ b/tests/org/apache/xalan/xpath3/ForExprTests.java
@@ -186,5 +186,15 @@ public class ForExprTests extends XslTransformTestsUtil {
         
         runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
     }
+    
+    @Test
+    public void xslForExprTest15() {
+        String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test15.xsl"; 
+        String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test15.xsl";
+        
+        String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test15.out";                
+        
+        runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+    }
 
 }
diff --git a/tests/org/apache/xalan/xslt3/AllXsl3Tests.java b/tests/org/apache/xalan/xslt3/AllXsl3Tests.java
index 2faca9c2..fbd2e753 100644
--- a/tests/org/apache/xalan/xslt3/AllXsl3Tests.java
+++ b/tests/org/apache/xalan/xslt3/AllXsl3Tests.java
@@ -20,6 +20,7 @@ import org.apache.xalan.xpath3.BuiltinFunctionsNamespceTests;
 import org.apache.xalan.xpath3.XsDurationComponentExtractionFunctionTests;
 import org.apache.xalan.xpath3.DynamicFunctionCallTests;
 import org.apache.xalan.xpath3.FnAbsTests;
+import org.apache.xalan.xpath3.FnCodepointsToStringTests;
 import org.apache.xalan.xpath3.FnDistinctValuesTests;
 import org.apache.xalan.xpath3.FnFilterTests;
 import org.apache.xalan.xpath3.FnFoldLeftTests;
@@ -29,6 +30,7 @@ import org.apache.xalan.xpath3.FnForEachTests;
 import org.apache.xalan.xpath3.FnIndexOfTests;
 import org.apache.xalan.xpath3.FnSortTests;
 import org.apache.xalan.xpath3.FnStringJoinTests;
+import org.apache.xalan.xpath3.FnStringToCodepointsTests;
 import org.apache.xalan.xpath3.FnTokenizeTests;
 import org.apache.xalan.xpath3.FnUnparsedTextTests;
 import org.apache.xalan.xpath3.ForExprTests;
@@ -77,7 +79,8 @@ import org.junit.runners.Suite.SuiteClasses;
                 SequenceConstructorTests.class, StringConcatExprTests.class, 
                 XsDurationComponentExtractionFunctionTests.class, XPathArithmeticOnDurationValuesTests.class,
                 NodeComparisonTests.class, SimpleMapOperatorTests.class, FnFoldLeftTests.class,
-                FnFoldRightTests.class, FnForEachPairTests.class, FnSortTests.class })
+                FnFoldRightTests.class, FnForEachPairTests.class, FnSortTests.class, FnCodepointsToStringTests.class,
+                FnStringToCodepointsTests.class })
 public class AllXsl3Tests {
 
 }


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