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/11/15 17:48:02 UTC

(xalan-java) branch xalan-j_xslt3.0_mvn updated: committing few xalan-j xslt 3.0 implementation improvements, and corresponding updates to xalan-j w3c xslt 3.0 test suite results

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 95784f4db committing few xalan-j xslt 3.0 implementation improvements, and corresponding updates to xalan-j w3c xslt 3.0 test suite results
95784f4db is described below

commit 95784f4db1395a01bc5c44ca8f3f97ae7cbf4fe2
Author: Mukul Gandhi <ga...@gmail.com>
AuthorDate: Sat Nov 15 23:17:42 2025 +0530

    committing few xalan-j xslt 3.0 implementation improvements, and corresponding updates to xalan-j w3c xslt 3.0 test suite results
---
 .../apache/xalan/processor/StylesheetHandler.java  |  16 +-
 .../processor/XSL3TransformerFactoryImpl.java      |  19 +-
 .../org/apache/xalan/res/XSLTErrorResources.java   |   1 +
 .../org/apache/xalan/templates/StylesheetRoot.java |  15 +-
 .../org/apache/xalan/templates/TemplateList.java   |  21 +-
 .../apache/xalan/transformer/TransformerImpl.java  |  42 ++-
 .../apache/xalan/transformer/XalanProperties.java  |  17 +-
 src/main/java/org/apache/xalan/xslt/Process.java   |  11 +-
 src/main/resources/xhtml_entities.dtd              |  16 +
 .../xalan/tests/main/XalanXsl3TestSuite2.java      |   4 +-
 .../xalan/tests/util/FileComparisonUtil.java       |   5 +-
 .../xalan/tests/util/XslTransformTestsUtil.java    |  46 +--
 .../tests/w3c/xslt3/W3CXslTransformTestsUtil.java  | 220 +++++++++----
 .../xalan/tests/w3c/xslt3/XmlEntityResolver.java   |  30 ++
 .../attr/XslDisableOutputEscapingAttrTests.java    |   2 +
 .../_disable-output-escaping-test-set_result.xml   |  70 +---
 .../xslt3/result/attr/_mode-test-set_result.xml    | 352 ++++++++++++++++++---
 .../result/decl/_character-map-test-set_result.xml |   4 +-
 .../result/expr/_expression-test-set_result.xml    |   4 +-
 .../result/insn/_call-template-test-set_result.xml |   4 +-
 .../xslt3/result/misc/_regex-test-set_result.xml   |  27 +-
 .../result/w3c_xslt3_testsuite_xalan-j_result.xml  |  14 +-
 ...java => XslDisableOutputEscapingAttrTests.java} |   2 +-
 23 files changed, 678 insertions(+), 264 deletions(-)

diff --git a/src/main/java/org/apache/xalan/processor/StylesheetHandler.java b/src/main/java/org/apache/xalan/processor/StylesheetHandler.java
index 0a793e91c..f354ed77f 100644
--- a/src/main/java/org/apache/xalan/processor/StylesheetHandler.java
+++ b/src/main/java/org/apache/xalan/processor/StylesheetHandler.java
@@ -95,6 +95,11 @@ public class StylesheetHandler extends DefaultHandler
    */
   private String m_init_template_name = null;
   
+  /**
+   * An XSL transformation initial mode name.
+   */
+  private String m_init_mode_name = null;
+  
   /**
    * Create a StylesheetHandler object, creating a root stylesheet
    * as the target.
@@ -120,11 +125,17 @@ public class StylesheetHandler extends DefaultHandler
             XSL3TransformerFactoryImpl.FEATURE_INCREMENTAL)).booleanValue();
     m_source_location = ((Boolean) processor.getAttribute(
             XSL3TransformerFactoryImpl.FEATURE_SOURCE_LOCATION)).booleanValue();
+    
     Object initTemplate = processor.getAttribute(XSL3TransformerFactoryImpl.FEATURE_INIT_TEMPLATE);
     if (initTemplate != null) {
-       m_init_template_name = ((String) processor.getAttribute(XSL3TransformerFactoryImpl.
-    		                                                                            FEATURE_INIT_TEMPLATE)).toString();
+       m_init_template_name = ((String)processor.getAttribute(XSL3TransformerFactoryImpl.FEATURE_INIT_TEMPLATE)).toString();
     }
+    
+    Object initMode = processor.getAttribute(XSL3TransformerFactoryImpl.FEATURE_INIT_MODE);
+    if (initMode != null) {
+       m_init_mode_name = ((String)processor.getAttribute(XSL3TransformerFactoryImpl.FEATURE_INIT_MODE)).toString();
+    }
+    
     init(processor);
   }
 
@@ -1215,6 +1226,7 @@ public class StylesheetHandler extends DefaultHandler
 	  XslTransformData.m_xslSystemId = getSystemId();
 	  
 	  m_stylesheetRoot.setInitTemplateName(m_init_template_name);
+	  m_stylesheetRoot.setInitModeName(m_init_mode_name);
 
 	  return m_stylesheetRoot;
   }
diff --git a/src/main/java/org/apache/xalan/processor/XSL3TransformerFactoryImpl.java b/src/main/java/org/apache/xalan/processor/XSL3TransformerFactoryImpl.java
index 25ea152ed..3554de1cf 100644
--- a/src/main/java/org/apache/xalan/processor/XSL3TransformerFactoryImpl.java
+++ b/src/main/java/org/apache/xalan/processor/XSL3TransformerFactoryImpl.java
@@ -108,6 +108,10 @@ public class XSL3TransformerFactoryImpl extends SAXTransformerFactory
   /** Static string to be used for initial template feature */
   public static final String FEATURE_INIT_TEMPLATE =
                              XalanProperties.INIT_TEMPLATE;
+  
+  /** Static string to be used for initial mode feature */
+  public static final String FEATURE_INIT_MODE =
+                             XalanProperties.INIT_MODE;
 
   public javax.xml.transform.Templates processFromNode(Node node)
           throws TransformerConfigurationException
@@ -485,10 +489,15 @@ public class XSL3TransformerFactoryImpl extends SAXTransformerFactory
   private boolean m_source_location = false;
   
   /**
-   * An XSL stylesheet initial template name.
+   * An XSL transformation's initial template name.
    */
   private String m_init_template_name = null;
   
+  /**
+   * An XSL transformation's initial mode name.
+   */
+  private String m_init_mode_name = null;
+  
   /**
    * Flag set by FEATURE_INCREMENTAL.
    * This feature specifies whether to produce output incrementally, rather than
@@ -574,6 +583,10 @@ public class XSL3TransformerFactoryImpl extends SAXTransformerFactory
     {
     	m_init_template_name = (String)value; 
     }
+    else if(name.equals(FEATURE_INIT_MODE))
+    {
+    	m_init_mode_name = (String)value; 
+    }
     else
     {
       throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_NOT_SUPPORTED, new Object[]{name})); //name + "not supported");
@@ -608,6 +621,10 @@ public class XSL3TransformerFactoryImpl extends SAXTransformerFactory
     {
       return m_init_template_name;
     }
+    else if (name.equals(FEATURE_INIT_MODE))
+    {
+      return m_init_mode_name;
+    }
     else
       throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_ATTRIB_VALUE_NOT_RECOGNIZED, new Object[]{name})); //name + " attribute not recognized");
   }
diff --git a/src/main/java/org/apache/xalan/res/XSLTErrorResources.java b/src/main/java/org/apache/xalan/res/XSLTErrorResources.java
index 57e0ba44b..ed9c645da 100644
--- a/src/main/java/org/apache/xalan/res/XSLTErrorResources.java
+++ b/src/main/java/org/apache/xalan/res/XSLTErrorResources.java
@@ -1380,6 +1380,7 @@ public class XSLTErrorResources extends ListResourceBundle
   { "optionXSVAL", "   [-XSVAL (Request XML Schema validation of XML input document)]"},
   { "optionXSLEVALUATE", "   [-XSLEVALUATE (Request xsl:evaluate instruction to be enabled)]"},
   { "optionINIT_TEMPLATE", "   [-INIT_TEMPLATE (Specify an XSL template's name to select an initial template for transformation)]"},
+  { "optionINIT_MODE", "   [-INIT_MODE (Specify an XSL transformation's initial mode name)]"},
   { "optionENCODING", "   [-ENCODING (Specify value of encoding to be used for XML input and stylesheet documents. Use format utf_8 (default), iso_8859_1 etc.)]"},
   { "optionOUT",  "   [-OUT outputFileName]"},
   { "optionLXCIN", "   [-LXCIN compiledStylesheetFileNameIn]"},
diff --git a/src/main/java/org/apache/xalan/templates/StylesheetRoot.java b/src/main/java/org/apache/xalan/templates/StylesheetRoot.java
index e7a8cf96e..9e94a335d 100644
--- a/src/main/java/org/apache/xalan/templates/StylesheetRoot.java
+++ b/src/main/java/org/apache/xalan/templates/StylesheetRoot.java
@@ -125,10 +125,15 @@ public class StylesheetRoot extends StylesheetComposed
     private XSModel m_xsModel;
     
     /**
-     * An XSL transformation initial template name.
+     * An XSL transformation's initial template name.
      */
     private String m_init_template_name = null;
     
+    /**
+     * An XSL transformation's initial mode name.
+     */
+    private String m_init_mode_name = null;
+    
     private ErrorListener m_errorListener;
     
   /**
@@ -2020,5 +2025,13 @@ public class StylesheetRoot extends StylesheetComposed
 	public void setInitTemplateName(String initTemplateName) {
 		this.m_init_template_name = initTemplateName;
 	}
+	
+	public String getInitModeName() {
+		return m_init_mode_name;
+	}
+
+	public void setInitModeName(String initModeName) {
+		this.m_init_mode_name = initModeName;
+	}
 
 }
diff --git a/src/main/java/org/apache/xalan/templates/TemplateList.java b/src/main/java/org/apache/xalan/templates/TemplateList.java
index 02916baac..9589dc7cc 100644
--- a/src/main/java/org/apache/xalan/templates/TemplateList.java
+++ b/src/main/java/org/apache/xalan/templates/TemplateList.java
@@ -169,17 +169,17 @@ public class TemplateList implements java.io.Serializable
     		}
     		
     		XslFunctionDefinitionKey funcDefnKey = new XslFunctionDefinitionKey(newFunc.getName(), funcArity, newFunc.getOverride());
-    		ElemFunction xslFunctionObj = m_functionDefinitions.get(funcDefnKey);
+    		ElemFunction xslFunctionObj = m_functionDeclarations.get(funcDefnKey);
     		if (xslFunctionObj == null) {
-    			m_functionDefinitions.put(funcDefnKey, newFunc);
+    			m_functionDeclarations.put(funcDefnKey, newFunc);
     		}
     		else {
     			int existingPrecedence = xslFunctionObj.getStylesheetComposed().getImportCountComposed();
     			int newPrecedence = newFunc.getStylesheetComposed().getImportCountComposed();
     			if (newPrecedence == existingPrecedence) {    				
     				if ((isOverrideDecl && newFunc.getOverride()) || (isOverrideExtDecl && newFunc.getOverrideExtensionFunction())) {
-    					m_functionDefinitions.remove(funcDefnKey);
-    					m_functionDefinitions.put(funcDefnKey, newFunc);
+    					m_functionDeclarations.remove(funcDefnKey);
+    					m_functionDeclarations.put(funcDefnKey, newFunc);
     				}
     				else {
     				    template.error(XSLTErrorResources.ER_DUPLICATE_XSL_FUNCTION,
@@ -537,9 +537,9 @@ public class TemplateList implements java.io.Serializable
   public ElemTemplate getXslFunction(QName qname, int arity)
   {
 	  XslFunctionDefinitionKey xslFunctionDefinitionKey = new XslFunctionDefinitionKey(qname, arity, true);
-	  ElemFunction elemFunc = m_functionDefinitions.get(xslFunctionDefinitionKey);
+	  ElemFunction elemFunc = m_functionDeclarations.get(xslFunctionDefinitionKey);
 	  if (elemFunc == null) {
-		  elemFunc = m_functionDefinitions.get(new XslFunctionDefinitionKey(qname, arity, false));  
+		  elemFunc = m_functionDeclarations.get(new XslFunctionDefinitionKey(qname, arity, false));  
 	  }
 
 	  return elemFunc;
@@ -560,8 +560,9 @@ public class TemplateList implements java.io.Serializable
                                                int targetNode, DTM dtm)
   {
     TemplateSubPatternAssociation head;
-
-    switch (dtm.getNodeType(targetNode))
+    
+    short nodeType = dtm.getNodeType(targetNode);    
+    switch (nodeType)
     {
     case DTM.ELEMENT_NODE :
     case DTM.ATTRIBUTE_NODE :
@@ -982,10 +983,10 @@ public class TemplateList implements java.io.Serializable
   private Hashtable m_namedTemplates = new Hashtable(89);
   
   /**
-   * An java.util.Map object to store xsl:function definitions 
+   * An java.util.Map object to store xsl:function declarations 
    * within an XSL stylesheet. 
    */
-  private Map<XslFunctionDefinitionKey, ElemFunction> m_functionDefinitions = new HashMap<XslFunctionDefinitionKey, ElemFunction>();
+  private Map<XslFunctionDefinitionKey, ElemFunction> m_functionDeclarations = new HashMap<XslFunctionDefinitionKey, ElemFunction>();
 
   /**
    * This table is keyed on the target elements
diff --git a/src/main/java/org/apache/xalan/transformer/TransformerImpl.java b/src/main/java/org/apache/xalan/transformer/TransformerImpl.java
index f7e33f112..dbeaeeb73 100644
--- a/src/main/java/org/apache/xalan/transformer/TransformerImpl.java
+++ b/src/main/java/org/apache/xalan/transformer/TransformerImpl.java
@@ -356,9 +356,14 @@ public class TransformerImpl extends Transformer
   private boolean m_source_location = false;
   
   /**
-   * An XSL stylesheet initial template name.
+   * An XSL transformation's initial template name.
    */
   private String m_init_template_name = null;
+  
+  /**
+   * An XSL transformation's initial mode name.
+   */
+  private String m_init_mode_name = null;
     
   /**
    * This is a compile-time flag to turn off calling
@@ -484,6 +489,7 @@ public class TransformerImpl extends Transformer
     m_incremental = stylesheet.getIncremental();
     m_source_location = stylesheet.getSource_location();
     m_init_template_name = stylesheet.getInitTemplateName();
+    m_init_mode_name = stylesheet.getInitModeName();
     setStylesheet(stylesheet);
     XPathContext xPath = new XPathContext(this);
     xPath.setIncremental(m_incremental);
@@ -887,9 +893,11 @@ public class TransformerImpl extends Transformer
       }
       finally
       {
+    	m_init_mode_name = null;
+    	  
         if (shouldRelease && (dtm != null)) {
           mgr.release(dtm, hardDelete);
-        }
+        }                
       }
 
       // Kick off the parse.  When the ContentHandler gets 
@@ -2460,7 +2468,13 @@ public class TransformerImpl extends Transformer
              }                          
           }          
           else {
-        	  QName mode = this.getMode();
+        	  QName mode = null;        	  
+        	  if (m_init_mode_name != null) {
+        		 mode = new QName(m_init_mode_name);        		         		 
+        	  }
+        	  else {
+        	     mode = this.getMode();
+        	  }
 
         	  if (isApplyImports)
         		  template = m_stylesheetRoot.getTemplateComposed(xctxt, child, mode,
@@ -2521,7 +2535,6 @@ public class TransformerImpl extends Transformer
       m_xcontext.pushCurrentNode(child);
       pushPairCurrentMatched(template, child);
       
-      // Fix copy copy29 test.
       if (!isApplyImports) {
           DTMCursorIterator cnl = new org.apache.xpath.NodeSetDTM(child, m_xcontext.getDTMManager());
           m_xcontext.pushContextNodeList(cnl);
@@ -2580,6 +2593,10 @@ public class TransformerImpl extends Transformer
       
       popElemTemplateElement();
     }
+    
+    if (m_init_mode_name != null) {
+       m_init_mode_name = null;
+    }
 
     return true;
   }
@@ -2608,8 +2625,9 @@ public class TransformerImpl extends Transformer
 
     try
     {
-      if(null != mode)
+      if((null != mode) && (m_init_mode_name == null)) {
         pushMode(mode);
+      }
       xctxt.pushCurrentNode(xctxt.getDTMHandleFromNode(context));
       executeChildTemplates(elem, handler);
     }
@@ -2619,8 +2637,9 @@ public class TransformerImpl extends Transformer
       
       // I'm not sure where or why this was here.  It is clearly in 
       // error though, without a corresponding pushMode().
-      if (null != mode)
+      if((null != mode) && (m_init_mode_name == null)) {
         popMode();
+      }
     }
   }
 
@@ -3683,7 +3702,16 @@ public class TransformerImpl extends Transformer
    */
   public QName getMode()
   {
-    return m_modes.isEmpty() ? null : (QName) m_modes.peek();
+	  QName result = null;
+	  
+	  if (m_init_mode_name != null) {
+		 result = new QName(m_init_mode_name); 
+	  }
+	  else {
+		 result = m_modes.isEmpty() ? null : (QName) m_modes.peek();
+	  }
+	  
+	  return result;
   }
   
   /**
diff --git a/src/main/java/org/apache/xalan/transformer/XalanProperties.java b/src/main/java/org/apache/xalan/transformer/XalanProperties.java
index 9bf83bb79..db3dfec27 100644
--- a/src/main/java/org/apache/xalan/transformer/XalanProperties.java
+++ b/src/main/java/org/apache/xalan/transformer/XalanProperties.java
@@ -15,10 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-/*
- * $Id$
- */
-
 package org.apache.xalan.transformer;
 
 /**
@@ -34,10 +30,15 @@ public class XalanProperties
     = "http://xml.apache.org/xalan/properties/source-location";
   
   /**
-   * Constant denoting an XSL stylesheet transformation feature,
-   * where an XSL template name for a named template is specified for 
-   * selecting an initial template from where an XSL transformation
-   * processing should begin.
+   * Constant representing an XSL stylesheet transformation's
+   * initial template feature.
    */
   public final static String INIT_TEMPLATE = "init-template";
+  
+  /**
+   * Constant representing an XSL stylesheet transformation's
+   * initial mode feature.
+   */
+  public final static String INIT_MODE = "init-mode";
+  
 }
diff --git a/src/main/java/org/apache/xalan/xslt/Process.java b/src/main/java/org/apache/xalan/xslt/Process.java
index 045f37c74..d63f88dbe 100644
--- a/src/main/java/org/apache/xalan/xslt/Process.java
+++ b/src/main/java/org/apache/xalan/xslt/Process.java
@@ -93,6 +93,7 @@ public class Process
     System.out.println(resbundle.getString("optionXSVAL"));  //"   [-XSVAL (Request XML Schema validation of XML input document)]");
     System.out.println(resbundle.getString("optionXSLEVALUATE"));  //"   [-XSLEVALUATE (Request xsl:evaluate instruction to be enabled)]");
     System.out.println(resbundle.getString("optionINIT_TEMPLATE"));  //" [-INIT_TEMPLATE (Specify an XSL template's name to select an initial template for transformation)]");
+    System.out.println(resbundle.getString("optionINIT_MODE"));  //" [-INIT_MODE (Specify an XSL transformation's initial mode name)]");
     System.out.println(resbundle.getString("optionENCODING"));  //" [-ENCODING (Specify value of encoding to be used for XML input and stylesheet documents. Use format utf_8 (default), iso_8859_1 etc.)]");
     System.out.println(resbundle.getString("optionOUT"));  //"   [-OUT outputFileName]");
 
@@ -165,7 +166,8 @@ public class Process
 	  boolean isSecureProcessing = false;    
 	  boolean isSchemaValidation = false;    
 	  boolean isXslEvaluate = false;
-	  String initialTemplateName = null;	  
+	  String initialTemplateName = null;
+	  String initialModeName = null;
 
 	  /**
 	   * The default java.io.PrintWriter diagnostic writer.
@@ -696,6 +698,13 @@ public class Process
 				  
 				  tfactory.setAttribute(XalanProperties.INIT_TEMPLATE, initialTemplateName);
 			  }
+			  else if ("-INIT_MODE".equalsIgnoreCase(argv[i])) {
+				  if (i + 1 < argv.length && argv[i + 1].charAt(0) != '-') {
+					  initialModeName = argv[++i]; 					  
+				  }
+				  
+				  tfactory.setAttribute(XalanProperties.INIT_MODE, initialModeName);
+			  }
 			  else
 				  System.err.println(
 						  XSLMessages.createMessage(
diff --git a/src/main/resources/xhtml_entities.dtd b/src/main/resources/xhtml_entities.dtd
new file mode 100644
index 000000000..bd12fd050
--- /dev/null
+++ b/src/main/resources/xhtml_entities.dtd
@@ -0,0 +1,16 @@
+<!-- 
+     XHTML entity definitions available within this document,
+     are copied from the locations:
+     
+     http://www.w3.org/MarkUp/DTD/xhtml-lat1.ent
+	 http://www.w3.org/MarkUp/DTD/xhtml-special.ent
+	 
+	 to provide to an XML parser's entity resolver configuration. 	 
+-->
+
+<!ENTITY lt      "&#38;#60;" ><!-- less-than sign, U+003C ISOnum -->
+<!ENTITY gt      "&#62;" ><!-- greater-than sign, U+003E ISOnum -->
+<!ENTITY amp     "&#38;#38;" ><!-- ampersand, U+0026 ISOnum -->
+<!ENTITY apos    "&#39;" ><!-- The Apostrophe (Apostrophe Quote, APL Quote), U+0027 ISOnum -->
+<!ENTITY quot    "&#34;" ><!-- quotation mark (Quote Double), U+0022 ISOnum -->
+<!ENTITY nbsp    "&#160;" ><!-- no-break space = non-breaking space, U+00A0 ISOnum -->
diff --git a/src/test/java/org/apache/xalan/tests/main/XalanXsl3TestSuite2.java b/src/test/java/org/apache/xalan/tests/main/XalanXsl3TestSuite2.java
index 2e78cbf00..73c17628b 100644
--- a/src/test/java/org/apache/xalan/tests/main/XalanXsl3TestSuite2.java
+++ b/src/test/java/org/apache/xalan/tests/main/XalanXsl3TestSuite2.java
@@ -84,7 +84,7 @@ import org.apache.xalan.tests.xslt3.XslAttributeTests;
 import org.apache.xalan.tests.xslt3.XslCharacterMapTests;
 import org.apache.xalan.tests.xslt3.XslContextItemTests;
 import org.apache.xalan.tests.xslt3.XslCopyTests;
-import org.apache.xalan.tests.xslt3.XslDisableOutputEscapingTests;
+import org.apache.xalan.tests.xslt3.XslDisableOutputEscapingAttrTests;
 import org.apache.xalan.tests.xslt3.XslExpandTextTests;
 import org.apache.xalan.tests.xslt3.XslForEachGroupMiscTests;
 import org.apache.xalan.tests.xslt3.XslForEachGroupTests;
@@ -151,7 +151,7 @@ import org.junit.runners.Suite.SuiteClasses;
                 XslJsonValidationTests.class, XPathUriQualifiedNameTests.class, FnRoundHalfToEvenTests.class,
                 XPathPartialFuncApplnTests.class, XslCopyTests.class, XalanJavascriptExtensionTests.class, XalanJavaExtensionTests.class,
                 XPathTextAndNodePattern.class, XPathLiteralSequenceTests.class, XslModeTests.class, XslTemplatePriorityTests.class,
-                XslDisableOutputEscapingTests.class } )
+                XslDisableOutputEscapingAttrTests.class } )
 public class XalanXsl3TestSuite2 {
 
 }
diff --git a/src/test/java/org/apache/xalan/tests/util/FileComparisonUtil.java b/src/test/java/org/apache/xalan/tests/util/FileComparisonUtil.java
index 764153421..dfc17907a 100644
--- a/src/test/java/org/apache/xalan/tests/util/FileComparisonUtil.java
+++ b/src/test/java/org/apache/xalan/tests/util/FileComparisonUtil.java
@@ -22,6 +22,7 @@ import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
+import org.apache.xalan.tests.w3c.xslt3.XmlEntityResolver;
 import org.apache.xalan.xslt.util.XslTransformEvaluationHelper;
 import org.apache.xml.utils.Constants;
 import org.json.JSONObject;
@@ -65,8 +66,10 @@ public class FileComparisonUtil {
 		m_xmlDocumentBuilderFactory = DocumentBuilderFactory.newInstance();
         m_xmlDocumentBuilderFactory.setNamespaceAware(true);
         
-        try {
+        try {        	 
             m_xmlDocumentBuilder = m_xmlDocumentBuilderFactory.newDocumentBuilder();
+            XmlEntityResolver xmlEntityResolver = new XmlEntityResolver();
+            m_xmlDocumentBuilder.setEntityResolver(xmlEntityResolver);
         } catch (ParserConfigurationException ex) {            
             ex.printStackTrace();
         }
diff --git a/src/test/java/org/apache/xalan/tests/util/XslTransformTestsUtil.java b/src/test/java/org/apache/xalan/tests/util/XslTransformTestsUtil.java
index d066e6ec5..7e5cb9748 100644
--- a/src/test/java/org/apache/xalan/tests/util/XslTransformTestsUtil.java
+++ b/src/test/java/org/apache/xalan/tests/util/XslTransformTestsUtil.java
@@ -74,6 +74,8 @@ public class XslTransformTestsUtil extends FileComparisonUtil {
     
     protected static String m_initTemplateName = null;
     
+    protected static String m_initModeName = null;
+    
     /**
      * Class field representing file path prefix, that is used for test cases
      * related to XSL instructions like xsl:result-document that have 'href' 
@@ -122,6 +124,10 @@ public class XslTransformTestsUtil extends FileComparisonUtil {
         	  m_xslTransformerFactory.setAttribute(XalanProperties.INIT_TEMPLATE, m_initTemplateName); 
            }
            
+           if (m_initModeName != null) {
+        	   m_xslTransformerFactory.setAttribute(XalanProperties.INIT_MODE, m_initModeName); 
+           }
+           
            StreamSource xsltStreamSrc = new StreamSource(xslDocumentUriStr);
        
            Transformer transformer = m_xslTransformerFactory.newTransformer(xsltStreamSrc);
@@ -191,11 +197,17 @@ public class XslTransformTestsUtil extends FileComparisonUtil {
             Assert.fail();    
         }
         finally {
-        	m_fileComparisonType = XSLTestConstants.XML;         	
+        	m_fileComparisonType = XSLTestConstants.XML;
+        	
         	if (m_initTemplateName != null) {
         		m_xslTransformerFactory.setAttribute(XalanProperties.INIT_TEMPLATE, null);
         		m_initTemplateName = null;
         	}
+        	
+        	if (m_initModeName != null) {
+        		m_xslTransformerFactory.setAttribute(XalanProperties.INIT_MODE, null);
+        		m_initModeName = null;
+        	}
         }
      }
     
@@ -651,38 +663,6 @@ public class XslTransformTestsUtil extends FileComparisonUtil {
         return result;
     }
     
-    /**
-     * When running W3C XSLT 3.0 test suite, check whether the test case 
-     * is written for XSLT 'initial mode' feature.
-     *  
-     * @param testCaseNode
-     * @return						Boolean value true or false						
-     */
-    protected boolean isXslt3InitialModeTestCase(Node testCaseNode) {
-    	
-    	boolean result = false;
-
-    	NodeList nodeList = testCaseNode.getChildNodes();
-    	int nodeListLength = nodeList.getLength();
-    	for (int idx = 0; idx < nodeListLength; idx++) {
-    		Node node = nodeList.item(idx);
-    		if (node.getNodeType() == Node.ELEMENT_NODE) {
-    			Element elemNode = (Element)node;
-    			String elemName = elemNode.getLocalName();
-    			if ("test".equals(elemName)) {
-    				NodeList nodeList1 = elemNode.getElementsByTagName("initial-mode");
-    				if (nodeList1.getLength() > 0) {
-    					result = true;
-
-    					break; 
-    				}
-    			}
-    		}
-    	}
-
-    	return result;
-    }
-    
     /**
      * Set XML Schema validation and xsl:evaluate XSL transformation properties, on 
      * Xalan-J's TransformerImpl object. 
diff --git a/src/test/java/org/apache/xalan/tests/w3c/xslt3/W3CXslTransformTestsUtil.java b/src/test/java/org/apache/xalan/tests/w3c/xslt3/W3CXslTransformTestsUtil.java
index 4fc08f2b7..3e9bf08f5 100644
--- a/src/test/java/org/apache/xalan/tests/w3c/xslt3/W3CXslTransformTestsUtil.java
+++ b/src/test/java/org/apache/xalan/tests/w3c/xslt3/W3CXslTransformTestsUtil.java
@@ -198,7 +198,7 @@ public class W3CXslTransformTestsUtil extends XslTransformTestsUtil {
        			  continue; 
      		   }
     		   else if (isXslt3PackageFeatureTestCase(node)) {
-    			   // We skip running XSLT 3.0 package feature test cases
+    			   // We skip running XSLT 3.0 xsl:package feature test cases, for now
     			   Element elemTestResult = testResultDoc.createElement("testResult");
     			   elemTestResult.setAttribute("testName", testCaseName);
     			   elemTestResult.setAttribute("status", "skipped");
@@ -207,16 +207,6 @@ public class W3CXslTransformTestsUtil extends XslTransformTestsUtil {
 
     			   continue; 
       		   }
-    		   else if (isXslt3InitialModeTestCase(node)) {
-    			   // We skip running XSLT 3.0 'initial mode' feature test cases
-    			   Element elemTestResult = testResultDoc.createElement("testResult");
-    			   elemTestResult.setAttribute("testName", testCaseName);
-    			   elemTestResult.setAttribute("status", "skipped");
-    			   elemTestResult.setAttribute("feature", "XSLT 3.0 'initial mode' test case");
-    			   elemTestRun.appendChild(elemTestResult);
-
-    			   continue; 
-      		   }
     		   else if (m_skipped_tests_list.contains(testCaseName)) {
     			   /**
     			    * We skip running XSLT 3.0 test cases available within this
@@ -299,6 +289,47 @@ public class W3CXslTransformTestsUtil extends XslTransformTestsUtil {
     			   }
     		   }
     		   
+    		   Map<String, XObject> xslParamMap = new HashMap<String, XObject>();
+    		   
+    		   for (int idx2 = 0; idx2 < nodeList2.getLength(); idx2++) {
+    			   Node node2 = nodeList2.item(idx2);
+    			   if (node2.getNodeType() == Node.ELEMENT_NODE) {
+    				   Element elemNode = (Element)node2;
+    				   if (ELEM_NODE_NAME_TEST.equals(elemNode.getLocalName())) {    					   
+    					   NodeList nodeList3 = elemNode.getElementsByTagName("stylesheet");
+    					   Element elemNode2 = (Element)(nodeList3.item(0));    					   
+    					   String fileName = elemNode2.getAttribute(FILE_ATTR);
+    					   URI uri = new URI(m_xslTransformTestSetFilePath);
+   						   uri = uri.resolve(fileName);
+   						   xslStylesheetUriStr = uri.toString();
+   						   
+   						   NodeList nodeList4 = elemNode.getElementsByTagName("initial-mode");
+   						   if (nodeList4.getLength() == 1) {
+   							   Element elemNode3 = (Element)(nodeList4.item(0));
+   							   m_initModeName = elemNode3.getAttribute(NAME_ATTR);
+   						   }
+   						   
+   						   NodeList xslParamNodeList = elemNode.getElementsByTagName("param");
+   						   int xslParamCount = xslParamNodeList.getLength();
+   						   for (int idx3 = 0; idx3 < xslParamCount; idx3++) {
+   							   Element elemParamNode = (Element)(xslParamNodeList.item(idx3));
+   							   String paramNameStr = elemParamNode.getAttribute("name");
+							   String paramXPathStr = elemParamNode.getAttribute("select");    								   
+							   XPathContext xctxt = new XPathContext(false); 
+							   org.apache.xpath.XPath paramXPathObj = new org.apache.xpath.XPath(paramXPathStr, null, xctxt.getNamespaceContext(), 
+									                                                                           org.apache.xpath.XPath.SELECT, null);
+							   XObject xObj = paramXPathObj.execute(xctxt, DTM.NULL, null);    								   
+							   xslParamMap.put(paramNameStr, xObj);
+   						   }
+   						   
+   						   Node siblingNode = elemNode.getNextSibling();
+   						   expectedResultElem = (Element)(siblingNode.getNextSibling());   						   
+   						   
+   						   break;
+    				   }
+    			   }
+    		   }
+    		   
     		   DOMSource xmlInpDomSource = null;
     		   
     		   if (xmlDocInpStr != null) {
@@ -310,8 +341,7 @@ public class W3CXslTransformTestsUtil extends XslTransformTestsUtil {
     		   StreamSource xslStreamSrc = new StreamSource(xslStylesheetUriStr);
     		   xslStreamSrc.setSystemId(xslStylesheetUriStr);
     		   
-    		   try {
-    			  Map<String, XObject> xslParamMap = new HashMap<String, XObject>();
+    		   try {    			  
     		      runW3CXSLTTestSuiteXslTransformAndEmitResult(testCaseName, xmlInpDomSource, xslStreamSrc, xslParamMap, 
     		    		                                                     expectedResultElem, elemTestRun, testResultDoc);
     		   }
@@ -663,6 +693,10 @@ public class W3CXslTransformTestsUtil extends XslTransformTestsUtil {
     		   }
     		}
     		
+    		if (m_initModeName != null) {
+     		   m_xslTransformerFactory.setAttribute(XalanProperties.INIT_MODE, m_initModeName);
+     		}
+    		
     		Transformer transformer = m_xslTransformerFactory.newTransformer(xslStreamSrc);
     		    		
     		TransformerImpl transformerImpl = (TransformerImpl)transformer;
@@ -720,56 +754,72 @@ public class W3CXslTransformTestsUtil extends XslTransformTestsUtil {
     		
     		transformer.transform(xmlInpSrc, new StreamResult(resultStrWriter));
     		
+    		String xslTransformMethod = transformer.getOutputProperty(OutputKeys.METHOD);
+    		
     		if (EXPECTED_NODE_KIND_ASSERT_ALL_OF.equals(expectedNodeKindName) || SERIALIZATION_MATCHES.equals(expectedNodeKindName) || 
-    				                                                             ASSERT_SERIALIZATION.equals(expectedNodeKindName)) {    			
-    			NodeList nodeList = ((Element)nodeExpected).getElementsByTagName(SERIALIZATION_MATCHES);
-    			int nodeListLength = nodeList.getLength();
-    			
-    			String xslTransformMethod = transformer.getOutputProperty(OutputKeys.METHOD);
-    			
+    				                                                             ASSERT_SERIALIZATION.equals(expectedNodeKindName)) {    			    			    			    			    			
     			if (SERIALIZATION_MATCHES.equals(expectedNodeKindName)) {
     				testCaseOneSerializationMatchCheck(elemTestResult, nodeExpected, resultStrWriter, xslTransformMethod);
     			}
-    			else if (ASSERT_SERIALIZATION.equals(expectedNodeKindName)) {    				
-    				String fileName = ((Element)nodeExpected).getAttribute("file");
-    				String encoding = ((Element)nodeExpected).getAttribute("encoding");
-    				int idx = m_xslTransformTestSetFilePath.lastIndexOf('/');
-    				String fileUriStr = m_xslTransformTestSetFilePath.substring(0, idx) + '/' + fileName;    				
-    				FileInputStream fileInpStr = new FileInputStream(new File(new URI(fileUriStr)));
-    				byte[] byteArr = new byte[512];
-    				int bytesRead = 0;
-    				StringBuffer strBuff = new StringBuffer();
-    				Charset charSet = null;
-    				if (!"".equals(encoding)) {
-    				   charSet = Charset.forName(encoding);
+    			else if (ASSERT_SERIALIZATION.equals(expectedNodeKindName)) {
+    				String xslTransformResultStr = resultStrWriter.toString();
+    				
+    				String expectedResultStr = null;
+    				Element nodeExpectedElem = (Element)nodeExpected;
+    				String fileName = nodeExpectedElem.getAttribute("file");
+    				String encoding = nodeExpectedElem.getAttribute("encoding");
+    				if (!"".equals(fileName)) {
+    					int idx2 = m_xslTransformTestSetFilePath.lastIndexOf('/');
+    					String fileUriStr = m_xslTransformTestSetFilePath.substring(0, idx2) + '/' + fileName;    				
+    					FileInputStream fileInpStr = new FileInputStream(new File(new URI(fileUriStr)));
+    					byte[] byteArr = new byte[512];
+    					int bytesRead = 0;
+    					StringBuffer strBuff = new StringBuffer();
+    					Charset charSet = null;
+    					if (!"".equals(encoding)) {
+    						charSet = Charset.forName(encoding);
+    					}
+    					while ((bytesRead = fileInpStr.read(byteArr)) != -1) {
+    						String str1 = null;
+    						if (charSet != null) {
+    							str1 = new String(byteArr, 0, bytesRead, charSet);
+    						}
+    						else {
+    							str1 = new String(byteArr, 0, bytesRead);  
+    						}
+    						strBuff.append(str1);
+    					}
+
+    					fileInpStr.close();
+
+    					expectedResultStr = strBuff.toString();
     				}
-    				while ((bytesRead = fileInpStr.read(byteArr)) != -1) {
-    				   String str1 = null;
-    				   if (charSet != null) {
-    				      str1 = new String(byteArr, 0, bytesRead, charSet);
-    				   }
-    				   else {
-    					  str1 = new String(byteArr, 0, bytesRead);  
-    				   }
-    				   strBuff.append(str1);
+    				else {
+    					expectedResultStr = nodeExpectedElem.getTextContent(); 
     				}
     				
-    				fileInpStr.close();
-    				
-    				String expectedResultStr = strBuff.toString();
-    				if ((resultStrWriter.toString()).equals(expectedResultStr)) {
+    				if (xslTransformResultStr.equals(expectedResultStr)) {
     					elemTestResult.setAttribute("status", "pass");
     				}
     				else {
     				    elemTestResult.setAttribute("status", "fail");
     				}    				
     			}
-    			else if (nodeListLength > 0) {
-    			    testCaseMultipleSerializationMatchChecks(elemTestResult, resultStrWriter, nodeList, xslTransformMethod);
-    			}
     			else {
-    				testCaseExpectedAssertXPathList(elemTestResult, nodeExpected, resultStrWriter, trfWarningList);
-    		    }
+    				/**
+    				 * expectedNodeKindName is EXPECTED_NODE_KIND_ASSERT_ALL_OF. Check for
+    				 * XSL transform result's conformance with multiple expected results below
+    				 * an XML element 'all-of'.
+    				 */
+    				NodeList nodeList = ((Element)nodeExpected).getElementsByTagName(SERIALIZATION_MATCHES);
+        			int nodeListLength = nodeList.getLength();        			
+        			if (nodeListLength > 0) {
+        			    testCaseMultipleSerializationMatchChecks(elemTestResult, resultStrWriter, nodeList, xslTransformMethod);
+        			}
+        			else {
+        				testCaseExpectedAssertXPathList(elemTestResult, nodeExpected, resultStrWriter, trfWarningList);
+        		    }
+    			}
     		}
     		else if (EXPECTED_NODE_KIND_ASSERT_ANY_OF.equals(expectedNodeKindName)) {
     			Node childNode = nodeExpected.getFirstChild();
@@ -949,10 +999,16 @@ public class W3CXslTransformTestsUtil extends XslTransformTestsUtil {
     		elemTestRun.appendChild(elemTestResult);    		
     		trfErrorList.clear();
     		trfFatalErrorList.clear();
+    		
     		if (m_initTemplateName != null) {
      		   m_xslTransformerFactory.setAttribute(XalanProperties.INIT_TEMPLATE, null);
      		   m_initTemplateName = null;
      		}
+    		
+    		if (m_initModeName != null) {
+      		   m_xslTransformerFactory.setAttribute(XalanProperties.INIT_MODE, null);
+      		   m_initModeName = null;
+      		}
     	}    	    	
     }
 
@@ -1043,10 +1099,14 @@ public class W3CXslTransformTestsUtil extends XslTransformTestsUtil {
 		
 		Object xslInitTemplateVal = m_xslTransformerFactory.getAttribute(XalanProperties.INIT_TEMPLATE);
 		m_xslTransformerFactory.setAttribute(XalanProperties.INIT_TEMPLATE, null);
+		
+		Object xslInitModeVal = m_xslTransformerFactory.getAttribute(XalanProperties.INIT_MODE);
+		m_xslTransformerFactory.setAttribute(XalanProperties.INIT_MODE, null);
 
 		Transformer transformer = m_xslTransformerFactory.newTransformer(new DOMSource(verificationXslDoc));
 		
 		m_xslTransformerFactory.setAttribute(XalanProperties.INIT_TEMPLATE, xslInitTemplateVal);
+		m_xslTransformerFactory.setAttribute(XalanProperties.INIT_MODE, xslInitModeVal);
 
 		StringWriter strWriter = new StringWriter();
 		
@@ -1250,6 +1310,21 @@ public class W3CXslTransformTestsUtil extends XslTransformTestsUtil {
 			xslTransformResultStr = xslTransformResultStr.replace("<META http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">", "");
 		}
 		
+		int idx = xslTransformResultStr.indexOf("?>");
+		if (idx > -1) {
+			String prefixStr = xslTransformResultStr.substring(0, idx + 2);
+			String suffixStr = xslTransformResultStr.substring(idx + 2);
+			xslTransformResultStr = prefixStr + "<!DOCTYPE document SYSTEM \"entities.dtd\" [ ]>" + suffixStr;		
+			if (xslTransformResultStr.contains("xmlns=\"http://www.w3.org/1999/xhtml\"")) {
+				xslTransformResultStr.replace("xmlns=\"http://www.w3.org/1999/xhtml\"", "");				
+				int i1 = xslTransformResultStr.indexOf(" xmlns=\"http://www.w3.org/1999/xhtml\"");
+				prefixStr = xslTransformResultStr.substring(0, i1);
+				suffixStr = xslTransformResultStr.substring(i1 + "xmlns=\"http://www.w3.org/1999/xhtml\"".length() + 1);
+			}
+
+			xslTransformResultStr = (prefixStr + suffixStr);
+		}
+		
 		if (!(org.apache.xml.serializer.Method.TEXT).equals(xslTransformMethod)) {
 	    	Document xmlResultDoc = m_xmlDocumentBuilder.parse(new ByteArrayInputStream(xslTransformResultStr.getBytes()));
 
@@ -1259,40 +1334,53 @@ public class W3CXslTransformTestsUtil extends XslTransformTestsUtil {
 	    	// Get list of all XML element nodes within DOM object xmlResultDoc
 	    	getXmlDomElemNodes(xmlResultDoc.getDocumentElement(), elemNodeList);		
 
-	    	for (int idx = 0; idx < elemNodeList.size(); idx++) {
-	    		elemNode = elemNodeList.get(idx);
+	    	int elemNodeListSize = elemNodeList.size();	    	
+	    	for (int idx2 = 0; idx2 < elemNodeListSize; idx2++) {
+	    		elemNode = elemNodeList.get(idx2);
 	    		String elemNodeStrValue = null;
 	    		String elemNodeStrValue2 = null; 
 	    		if ((elemNode.getFirstChild() != null) && ((Node)(elemNode.getFirstChild()).getFirstChild() != null)) {
 	    			Node node = elemNode.getFirstChild();
 	    			node = node.getFirstChild();
 	    			elemNodeStrValue = serializeXmlDomElementNode(node);
-	    			int i = elemNodeStrValue.indexOf("?>");
-	    			if (i > -1) {
-	    				elemNodeStrValue = (elemNodeStrValue.substring(i + 2)).trim();
+	    			int i1 = elemNodeStrValue.indexOf("?>");
+	    			if (i1 > -1) {
+	    				elemNodeStrValue = (elemNodeStrValue.substring(i1 + 2)).trim();
 	    			}
 	    		}
 	    		else {
 	    			elemNodeStrValue = elemNode.getTextContent();
 	    			elemNodeStrValue2 = serializeXmlDomElementNode(elemNode);
-	    			int i = elemNodeStrValue2.indexOf("?>");
-	    			if (i > -1) {
-	    				elemNodeStrValue2 = (elemNodeStrValue2.substring(i + 2)).trim();
+	    			int i1 = elemNodeStrValue2.indexOf("?>");
+	    			if (i1 > -1) {
+	    				elemNodeStrValue2 = (elemNodeStrValue2.substring(i1 + 2)).trim();
 	    			}
 	    		}
 
 	    		String[] strArray = serMatchesMetaData.getStrArr();
 	    		String strValue = serMatchesMetaData.getStrValue();
+	    			    			    			    			    		
 	    		if (strValue != null) {
-	    			Pattern pattern = Pattern.compile(strValue);   							 
-	    			Matcher matcher = pattern.matcher(elemNodeStrValue);
-	    			Matcher matcher2 = pattern.matcher(elemNodeStrValue2);  
-	    			if (strValue.equals(elemNodeStrValue) || matcher.matches()) {
-	    				isTestCasePass = true;
-	    			}
-	    			else if (strValue.equals(elemNodeStrValue2) || matcher2.matches()) {
-	    				isTestCasePass = true; 
-	    			}
+	    			Document xmlResultDoc2 = null;	    			
+	    			try {
+	    				String str2 = "<!DOCTYPE document SYSTEM \"entities.dtd\" [ ]>" + strValue;
+	    				xmlResultDoc2 = m_xmlDocumentBuilder.parse(new ByteArrayInputStream(str2.getBytes()));
+	    				strValue = serializeXmlDomElementNode(xmlResultDoc2);	    				
+	    				int strLength1 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE document SYSTEM \"entities.dtd\">".length();
+	    				strValue = (strValue.substring(strLength1)).trim();
+	    				Pattern pattern = Pattern.compile(strValue);   							 
+	    				Matcher matcher = pattern.matcher(elemNodeStrValue);
+	    				Matcher matcher2 = pattern.matcher(elemNodeStrValue2);  
+	    				if (strValue.equals(elemNodeStrValue) || matcher.matches()) {
+	    					isTestCasePass = true;
+	    				}
+	    				else if (strValue.equals(elemNodeStrValue2) || matcher2.matches()) {
+	    					isTestCasePass = true; 
+	    				}
+	    		    }
+	    		    catch (Exception ex) {
+	    		    	// NO OP
+	    		    }
 	    		}
 	    		else {
 	    			String attrName = strArray[0];
diff --git a/src/test/java/org/apache/xalan/tests/w3c/xslt3/XmlEntityResolver.java b/src/test/java/org/apache/xalan/tests/w3c/xslt3/XmlEntityResolver.java
new file mode 100644
index 000000000..cd00081c9
--- /dev/null
+++ b/src/test/java/org/apache/xalan/tests/w3c/xslt3/XmlEntityResolver.java
@@ -0,0 +1,30 @@
+package org.apache.xalan.tests.w3c.xslt3;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * A class definition, representing an XML parse entity resolver.
+ * 
+ * @author Mukul Gandhi <mu...@apache.org>
+ * 
+ * @xsl.usage advanced
+ */
+public class XmlEntityResolver implements EntityResolver {
+
+	@Override
+	public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
+
+		InputStream inpStream = getClass().getResourceAsStream("/xhtml_entities.dtd");
+        if (inpStream != null) {
+            return new InputSource(inpStream);
+        }
+        
+        return null;
+	}
+
+}
diff --git a/src/test/java/org/apache/xalan/tests/w3c/xslt3/attr/XslDisableOutputEscapingAttrTests.java b/src/test/java/org/apache/xalan/tests/w3c/xslt3/attr/XslDisableOutputEscapingAttrTests.java
index c27a575ef..f7ed891ae 100644
--- a/src/test/java/org/apache/xalan/tests/w3c/xslt3/attr/XslDisableOutputEscapingAttrTests.java
+++ b/src/test/java/org/apache/xalan/tests/w3c/xslt3/attr/XslDisableOutputEscapingAttrTests.java
@@ -37,6 +37,8 @@ public class XslDisableOutputEscapingAttrTests extends W3CXslTransformTestsUtil
     	m_resultSubFolderName = "attr";    	
     	
     	m_testResultFileName = "_disable-output-escaping-test-set_result.xml";
+    	
+    	m_skipped_tests_list.add("doe-0177a");
     }
 
     @AfterClass
diff --git a/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/attr/_disable-output-escaping-test-set_result.xml b/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/attr/_disable-output-escaping-test-set_result.xml
index e755acc16..ddfff7f79 100644
--- a/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/attr/_disable-output-escaping-test-set_result.xml
+++ b/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/attr/_disable-output-escaping-test-set_result.xml
@@ -1,58 +1,22 @@
-<?xml version="1.0" encoding="UTF-8"?><testrun dateTime="2025-11-13T16:37:44Z" fail="22" name="disable-output-escaping" pass="5" skipped="4" statusUnknown="1" totalRun="28">
-   <testResult status="fail" testName="doe-0176">
-      <outResult/>
-   </testResult>
-   <testResult status="fail" testName="doe-0176a">
-      <outResult/>
-   </testResult>
-   <testResult status="fail" testName="doe-0176b">
-      <outResult/>
-   </testResult>
-   <testResult status="fail" testName="doe-0176c">
-      <outResult/>
-   </testResult>
-   <testResult status="fail" testName="doe-0176d">
-      <outResult/>
-   </testResult>
-   <testResult status="fail" testName="doe-0176e">
-      <outResult/>
-   </testResult>
+<?xml version="1.0" encoding="UTF-8"?><testrun dateTime="2025-11-15T17:37:05Z" fail="10" name="disable-output-escaping" pass="16" skipped="5" statusUnknown="1" totalRun="27">
+   <testResult status="pass" testName="doe-0176"/>
+   <testResult status="pass" testName="doe-0176a"/>
+   <testResult status="pass" testName="doe-0176b"/>
+   <testResult status="pass" testName="doe-0176c"/>
+   <testResult status="pass" testName="doe-0176d"/>
+   <testResult status="pass" testName="doe-0176e"/>
    <testResult status="pass" testName="doe-0176f"/>
    <testResult status="skipped" testName="doe-0177" xsltVersion="XSLT 2.0/1.0 only test case"/>
-   <testResult status="fail" testName="doe-0177a">
-      <outResult/>
-   </testResult>
-   <testResult status="fail" testName="doe-0180">
-      <outResult/>
-   </testResult>
-   <testResult status="fail" testName="doe-0181">
-      <outResult/>
-   </testResult>
-   <testResult status="fail" testName="doe-0182">
-      <outResult/>
-   </testResult>
-   <testResult status="fail" testName="doe-0183">
-      <outResult/>
-   </testResult>
-   <testResult status="fail" testName="doe-0184">
-      <outResult>
-         <errTrace>XTTE0570 : A sequence of size 3, cannot be cast to a type text().</errTrace>
-      </outResult>
-   </testResult>
-   <testResult status="fail" testName="doe-0185">
-      <outResult/>
-   </testResult>
-   <testResult status="fail" testName="doe-0186">
-      <outResult>
-         <errTrace>XTTE0570 : A sequence of size 3, cannot be cast to a type text().</errTrace>
-      </outResult>
-   </testResult>
-   <testResult status="fail" testName="doe-0190">
-      <outResult/>
-   </testResult>
-   <testResult status="fail" testName="doe-0191">
-      <outResult/>
-   </testResult>
+   <testResult reason="Xalan configured" status="skipped" testName="doe-0177a"/>
+   <testResult status="pass" testName="doe-0180"/>
+   <testResult status="pass" testName="doe-0181"/>
+   <testResult status="pass" testName="doe-0182"/>
+   <testResult status="fail" testName="doe-0183"/>
+   <testResult status="fail" testName="doe-0184"/>
+   <testResult status="fail" testName="doe-0185"/>
+   <testResult status="fail" testName="doe-0186"/>
+   <testResult status="pass" testName="doe-0190"/>
+   <testResult status="pass" testName="doe-0191"/>
    <testResult status="fail" testName="doe-0201"/>
    <testResult status="pass" testName="doe-0401"/>
    <testResult status="fail" testName="doe-0402">
diff --git a/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/attr/_mode-test-set_result.xml b/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/attr/_mode-test-set_result.xml
index 31e3548b0..ae8dde7b6 100644
--- a/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/attr/_mode-test-set_result.xml
+++ b/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/attr/_mode-test-set_result.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?><testrun dateTime="2025-11-13T16:37:44Z" fail="26" name="mode" pass="54" skipped="89" statusUnknown="0" totalRun="80">
+<?xml version="1.0" encoding="UTF-8"?><testrun dateTime="2025-11-15T17:37:04Z" fail="59" name="mode" pass="64" skipped="46" statusUnknown="0" totalRun="123">
    <testResult status="pass" testName="mode-0001"/>
    <testResult feature="streaming" status="skipped" testName="mode-0002"/>
    <testResult status="pass" testName="mode-0003"/>
@@ -39,14 +39,45 @@
    <testResult status="pass" testName="mode-0806"/>
    <testResult status="pass" testName="mode-0901"/>
    <testResult status="pass" testName="mode-1001"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1101"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1102"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1103"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1104"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1105"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1106a"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1106b"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1106c"/>
+   <testResult status="pass" testName="mode-1101"/>
+   <testResult status="fail" testName="mode-1102">
+      <outResult>
+         <errTrace>Illegal value: b X  c  used for QNAME attribute: mode</errTrace>
+         <errTrace>Illegal value:  a used for QNAME attribute: mode</errTrace>
+         <errTrace>Illegal value: a  used for QNAME attribute: mode</errTrace>
+         <errTrace>Illegal value:  X  used for QNAME attribute: mode</errTrace>
+      </outResult>
+   </testResult>
+   <testResult status="pass" testName="mode-1103"/>
+   <testResult status="pass" testName="mode-1104"/>
+   <testResult status="fail" testName="mode-1105"/>
+   <testResult status="fail" testName="mode-1106a">
+      <outResult>
+         <errTrace>Illegal value: X	Y
+Z&#13;#unnamed used for QNAME attribute: mode</errTrace>
+         <errTrace>Could not find function: {http://www.w3.org/2005/xpath-functions}accumulator-after()</errTrace>
+         <errTrace>function token not found.</errTrace>
+         <errTrace>java.lang.NullPointerException</errTrace>
+      </outResult>
+   </testResult>
+   <testResult status="fail" testName="mode-1106b">
+      <outResult>
+         <errTrace>Illegal value: X	Y
+Z&#13;#unnamed used for QNAME attribute: mode</errTrace>
+         <errTrace>Could not find function: {http://www.w3.org/2005/xpath-functions}accumulator-after()</errTrace>
+         <errTrace>function token not found.</errTrace>
+         <errTrace>java.lang.NullPointerException</errTrace>
+      </outResult>
+   </testResult>
+   <testResult status="fail" testName="mode-1106c">
+      <outResult>
+         <errTrace>Illegal value: X	Y
+Z&#13;#unnamed used for QNAME attribute: mode</errTrace>
+         <errTrace>Could not find function: {http://www.w3.org/2005/xpath-functions}accumulator-after()</errTrace>
+         <errTrace>function token not found.</errTrace>
+         <errTrace>java.lang.NullPointerException</errTrace>
+      </outResult>
+   </testResult>
    <testResult status="fail" testName="mode-1106d">
       <outResult>
          <errTrace>Illegal value: X	Y
@@ -56,11 +87,47 @@ Z&#13;#unnamed used for QNAME attribute: mode</errTrace>
          <errTrace>java.lang.NullPointerException</errTrace>
       </outResult>
    </testResult>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1106e"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1107a"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1107b"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1107c"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1108"/>
+   <testResult status="fail" testName="mode-1106e">
+      <outResult>
+         <errTrace>Illegal value: X	Y
+Z&#13;#unnamed used for QNAME attribute: mode</errTrace>
+         <errTrace>Could not find function: {http://www.w3.org/2005/xpath-functions}accumulator-after()</errTrace>
+         <errTrace>function token not found.</errTrace>
+         <errTrace>java.lang.NullPointerException</errTrace>
+      </outResult>
+   </testResult>
+   <testResult status="fail" testName="mode-1107a">
+      <outResult>
+         <errTrace>Illegal value: X	Y
+Z&#13;#unnamed used for QNAME attribute: mode</errTrace>
+         <errTrace>Could not find function: {http://www.w3.org/2005/xpath-functions}accumulator-after()</errTrace>
+         <errTrace>function token not found.</errTrace>
+         <errTrace>java.lang.NullPointerException</errTrace>
+      </outResult>
+   </testResult>
+   <testResult status="fail" testName="mode-1107b">
+      <outResult>
+         <errTrace>Illegal value: X	Y
+Z&#13;#unnamed used for QNAME attribute: mode</errTrace>
+         <errTrace>Could not find function: {http://www.w3.org/2005/xpath-functions}accumulator-after()</errTrace>
+         <errTrace>function token not found.</errTrace>
+         <errTrace>java.lang.NullPointerException</errTrace>
+      </outResult>
+   </testResult>
+   <testResult status="fail" testName="mode-1107c">
+      <outResult>
+         <errTrace>Illegal value: X	Y
+Z&#13;#unnamed used for QNAME attribute: mode</errTrace>
+         <errTrace>Could not find function: {http://www.w3.org/2005/xpath-functions}accumulator-after()</errTrace>
+         <errTrace>function token not found.</errTrace>
+         <errTrace>java.lang.NullPointerException</errTrace>
+      </outResult>
+   </testResult>
+   <testResult status="fail" testName="mode-1108">
+      <outResult>
+         <errTrace>XTSE0010 : xsl:apply-templates is not allowed in this position in the stylesheet</errTrace>
+      </outResult>
+   </testResult>
    <testResult status="pass" testName="mode-1201"/>
    <testResult status="pass" testName="mode-1202"/>
    <testResult status="pass" testName="mode-1203"/>
@@ -69,54 +136,230 @@ Z&#13;#unnamed used for QNAME attribute: mode</errTrace>
    <testResult status="fail" testName="mode-1401"/>
    <testResult status="pass" testName="mode-1402"/>
    <testResult status="fail" testName="mode-1403"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1404"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1405"/>
+   <testResult status="fail" testName="mode-1404"/>
+   <testResult status="fail" testName="mode-1405">
+      <outResult/>
+   </testResult>
    <testResult feature="streaming" status="skipped" testName="mode-1406"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1407"/>
+   <testResult status="fail" testName="mode-1407">
+      <outResult/>
+   </testResult>
    <testResult feature="streaming" status="skipped" testName="mode-1408"/>
    <testResult status="fail" testName="mode-1409">
       <outResult/>
    </testResult>
    <testResult feature="streaming" status="skipped" testName="mode-1410"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1411"/>
+   <testResult status="pass" testName="mode-1411"/>
    <testResult feature="streaming" status="skipped" testName="mode-1412"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1413"/>
+   <testResult status="fail" testName="mode-1413"/>
    <testResult feature="streaming" status="skipped" testName="mode-1414"/>
    <testResult status="pass" testName="mode-1415"/>
    <testResult feature="streaming" status="skipped" testName="mode-1416"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1417"/>
+   <testResult status="pass" testName="mode-1417"/>
    <testResult feature="streaming" status="skipped" testName="mode-1418"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1419"/>
+   <testResult status="fail" testName="mode-1419"/>
    <testResult feature="streaming" status="skipped" testName="mode-1420"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1421"/>
+   <testResult status="fail" testName="mode-1421"/>
    <testResult feature="streaming" status="skipped" testName="mode-1422"/>
    <testResult status="pass" testName="mode-1423"/>
    <testResult feature="streaming" status="skipped" testName="mode-1424"/>
    <testResult status="fail" testName="mode-1425"/>
    <testResult feature="streaming" status="skipped" testName="mode-1426"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1427"/>
+   <testResult status="fail" testName="mode-1427">
+      <outResult/>
+   </testResult>
    <testResult feature="streaming" status="skipped" testName="mode-1428"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1429"/>
+   <testResult status="fail" testName="mode-1429">
+      <outResult>
+         <errTrace>Illegal value:  Q{}s  used for QNAME attribute: name</errTrace>
+         <errTrace>Illegal value:  s  used for QNAME attribute: mode</errTrace>
+         <errTrace>XTSE0740 : An XSL template's name attribute doesn't have a URI reference</errTrace>
+         <errTrace>Illegal value:  #current  used for QNAME attribute: mode</errTrace>
+         <errTrace>Illegal value:  s  used for QNAME attribute: mode</errTrace>
+         <errTrace>Illegal value:  Q{}s  used for QNAME attribute: mode</errTrace>
+         <errTrace>XTTE0505 : An XSL mode instruction's attribute "on-no-match" has disallowed value ' text-only-copy '.</errTrace>
+      </outResult>
+   </testResult>
    <testResult feature="streaming" status="skipped" testName="mode-1430"/>
    <testResult status="pass" testName="mode-1431"/>
    <testResult feature="streaming" status="skipped" testName="mode-1432"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1433"/>
+   <testResult status="fail" testName="mode-1433">
+      <outResult/>
+   </testResult>
    <testResult status="fail" testName="mode-1434"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1435"/>
+   <testResult status="fail" testName="mode-1435">
+      <outResult>
+         <errTrace>Illegal value:  a:mode  used for QNAME attribute: default-mode</errTrace>
+      </outResult>
+   </testResult>
    <testResult feature="streaming" status="skipped" testName="mode-1436"/>
    <testResult feature="streaming" status="skipped" testName="mode-1437"/>
    <testResult status="pass" testName="mode-1437a"/>
    <testResult feature="streaming" status="skipped" testName="mode-1438"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1439"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1440"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1441"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1442"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1443"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1444"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1445"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1446"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1447"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1501"/>
+   <testResult status="fail" testName="mode-1439">
+      <outResult>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;book&gt;&#13;
+ &lt;bktlong&gt;The First Book of Moses, Called GENESIS.&lt;/bktlong&gt;&#13;
+ &lt;bktshort&gt;Genesis&lt;/bktshort&gt;&#13;
+ &lt;chapter length="4097" nr="1"&gt;&#13;
+    &lt;chtitle&gt;Chapter 1&lt;/chtitle&gt;&#13;
+    &lt;v&gt;In the beginning &lt;deity&gt;God&lt;/deity&gt; created the heaven and the earth.&lt;/v&gt;&#13;
+    &lt;v&gt;And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of &lt;deity&gt;God&lt;/deity&gt; moved upon the face of the waters.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; said, Let there be light: and there was light.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; saw the light, that it was good: and &lt;deity&gt;God&lt;/deity&gt; divided the light from the darkness.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; called the light Day, and the darkness he called Night. And the evening and the morning were the first day.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; said, Let there be a firmament in the midst of the waters, and let it divide the waters from the waters.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; made the firmament, and divided the waters which were under the firmament from the waters which were above the firmament: and it was so.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; called the firmament Heaven. And the evening and the morning were the second day.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; said, Let the waters under the heaven be gathered together unto one place, and let the dry land appear: and it was so.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; called the dry land Earth; and the gathering together of the waters called he Seas: and &lt;deity&gt;God&lt;/deity&gt; saw that it was good.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; said, Let the earth bring forth grass, the herb yielding seed, and the fruit tree yielding fruit after his kind, whose seed is in itself, upon the earth: and it was so.&lt;/v&gt;&#13;
+    &lt;v&gt;And the earth brought forth grass, and herb yielding seed after his kind, and the tree yielding fruit, whose seed was in itself, after his kind: and &lt;deity&gt;God&lt;/deity&gt; saw that it was good.&lt;/v&gt;&#13;
+    &lt;v&gt;And the evening and the morning were the third day.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; said, Let there be lights in the firmament of the heaven to divide the day from the night; and let them be for signs, and for seasons, and for days, and years:&lt;/v&gt;&#13;
+    &lt;v&gt;And let them be for lights in the firmament of the heaven to give light upon the earth: and it was so.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; made two great lights; the greater light to rule the day, and the lesser light to rule the night: he made the stars also.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; set them in the firmament of the heaven to give light upon the earth,&lt;/v&gt;&#13;
+    &lt;v&gt;And to rule over the day and over the night, and to divide the light from the darkness: and &lt;deity&gt;God&lt;/deity&gt; saw that it was good.&lt;/v&gt;&#13;
+    &lt;v&gt;And the evening and the morning were the fourth day.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; said, Let the waters bring forth abundantly the moving creature that hath life, and fowl that may fly above the earth in the open firmament of heaven.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; created great whales, and every living creature that moveth, which the waters brought forth abundantly, after their kind, and every winged fowl after his kind: and &lt;deity&gt;God&lt;/deity&gt; saw that it was good.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; blessed them, saying, Be fruitful, and multiply, and fill the waters in the seas, and let fowl multiply in the earth.&lt;/v&gt;&#13;
+    &lt;v&gt;And the evening and the morning were the fifth day.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; said, Let the earth bring forth the living creature after his kind, cattle, and creeping thing, and beast of the earth after his kind: and it was so.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; made the beast of the earth after his kind, and cattle after their kind, and every thing that creepeth upon the earth after his kind: and &lt;deity&gt;God&lt;/deity&gt; saw that it was good.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; said, Let us make man in our image, after our likeness: and let them have dominion over the fish of the sea, and over the fowl of the air, and over the cattle, and over all the earth, and over every creeping thing that creepeth upon the earth.&lt;/v&gt;&#13;
+    &lt;v&gt;So &lt;deity&gt;God&lt;/deity&gt; created man in his own image, in the image of &lt;deity&gt;God&lt;/deity&gt; created he him; male and female created he them.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; blessed them, and &lt;deity&gt;God&lt;/deity&gt; said unto them, Be fruitful, and multiply, and replenish the earth, and subdue it: and have dominion over the fish of the sea, and over the fowl of the air, and over every living thing that moveth upon the earth.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; said, Behold, I have given you every herb bearing seed, which is upon the face of all the earth, and every tree, in the which is the fruit of a tree yielding seed; to you it shall be for meat.&lt;/v&gt;&#13;
+    &lt;v&gt;And to every beast of the earth, and to every fowl of the air, and to every thing that creepeth upon the earth, wherein there is life, I have given every green herb for meat: and it was so.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; saw every thing that he had made, and, behold, it was very good. And the evening and the morning were the sixth day.&lt;/v&gt;&#13;
+ &lt;/chapter&gt;&#13;
+ &lt;chapter length="3105" nr="2"&gt;&#13;
+    &lt;chtitle&gt;Chapter 2&lt;/chtitle&gt;&#13;
+    &lt;v&gt;Thus the heavens and the earth were finished, and all the host of them.&lt;/v&gt;&#13;
+    &lt;v&gt;And on the seventh day &lt;deity&gt;God&lt;/deity&gt; ended his work which he had made; and he rested on the seventh day from all his work which he had made.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; blessed the seventh day, and sanctified it: because that in it he had rested from all his work which &lt;deity&gt;God&lt;/deity&gt; created and made.&lt;/v&gt;&#13;
+    &lt;v&gt;These are the generations of the heavens and of the earth when they were created, in the day that the LORD &lt;deity&gt;God&lt;/deity&gt; made the earth and the heavens,&lt;/v&gt;&#13;
+    &lt;v&gt;And every plant of the field before it was in the earth, and every herb of the field before it grew: for the LORD &lt;deity&gt;God&lt;/deity&gt; had not caused it to rain upon the earth, and there was not a man to till the ground.&lt;/v&gt;&#13;
+    &lt;v&gt;But there went up a mist from the earth, and watered the whole face of the ground.&lt;/v&gt;&#13;
+    &lt;v&gt;And the LORD &lt;deity&gt;God&lt;/deity&gt; formed man of the dust of the ground, and breathed into his nostrils the breath of life; and man became a living soul.&lt;/v&gt;&#13;
+    &lt;v&gt;And the LORD &lt;deity&gt;God&lt;/deity&gt; planted a garden eastward in &lt;place&gt;Eden&lt;/place&gt;; and there he put the man whom he had formed.&lt;/v&gt;&#13;
+    &lt;v&gt;And out of the ground made the LORD &lt;deity&gt;God&lt;/deity&gt; to grow every tree that is pleasant to the sight, and good for food; the tree of life also in the midst of the garden, and the tree of knowledge of good and evil.&lt;/v&gt;&#13;
+    &lt;v&gt;And a river went out of &lt;place&gt;Eden&lt;/place&gt; to water the garden; and from thence it was parted, and became into four heads.&lt;/v&gt;&#13;
+    &lt;v&gt;The name of the first is &lt;place&gt;Pison&lt;/place&gt;: that is it which compasseth the whole land of &lt;place&gt;Havilah&lt;/place&gt;, where there is gold;&lt;/v&gt;&#13;
+    &lt;v&gt;And the gold of that land is good: there is bdellium and the onyx stone.&lt;/v&gt;&#13;
+    &lt;v&gt;And the name of the second river is &lt;place&gt;Gihon&lt;/place&gt;: the same is it that compasseth the whole land of &lt;place&gt;Ethiopia&lt;/place&gt;.&lt;/v&gt;&#13;
+    &lt;v&gt;And the name of the third river is &lt;place&gt;Hiddekel&lt;/place&gt;: that is it which goeth toward the east of &lt;place&gt;Assyria&lt;/place&gt;. And the fourth river is &lt;place&gt;Euphrates&lt;/place&gt;.&lt;/v&gt;&#13;
+    &lt;v&gt;And the LORD &lt;deity&gt;God&lt;/deity&gt; took the man, and put him into the garden of &lt;place&gt;Eden&lt;/place&gt; to dress it and to keep it.&lt;/v&gt;&#13;
+    &lt;v&gt;And the LORD &lt;deity&gt;God&lt;/deity&gt; commanded the man, saying, Of every tree of the garden thou mayest freely eat:&lt;/v&gt;&#13;
+    &lt;v&gt;But of the tree of the knowledge of good and evil, thou shalt not eat of it: for in the day that thou eatest thereof thou shalt surely die.&lt;/v&gt;&#13;
+    &lt;v&gt;And the LORD &lt;deity&gt;God&lt;/deity&gt; said, It is not good that the man should be alone; I will make him an help meet for him.&lt;/v&gt;&#13;
+    &lt;v&gt;And out of the ground the LORD &lt;deity&gt;God&lt;/deity&gt; formed every beast of the field, and every fowl of the air; and brought them unto &lt;person&gt;Adam&lt;/person&gt; to see what he would call them: and whatsoever &lt;person&gt;Adam&lt;/person&gt; called every living creature, that was the name thereof.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;person&gt;Adam&lt;/person&gt; gave names to all cattle, and to the fowl of the air, and to every beast of the field; but for &lt;person&gt;Adam&lt;/person&gt; there was not found an help meet for him.&lt;/v&gt;&#13;
+    &lt;v&gt;And the LORD &lt;deity&gt;God&lt;/deity&gt; caused a deep sleep to fall upon &lt;person&gt;Adam&lt;/person&gt;, and he slept: and he took one of his ribs, and closed up the flesh instead thereof;&lt;/v&gt;&#13;
+    &lt;v&gt;And the rib, which the LORD &lt;deity&gt;God&lt;/deity&gt; had taken from man, made he a woman, and brought her unto the man.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;person&gt;Adam&lt;/person&gt; said, This is now bone of my bones, and flesh of my flesh: she shall be called Woman, because she was taken out of Man.&lt;/v&gt;&#13;
+    &lt;v&gt;Therefore shall a man leave his father and his mother, and shall cleave unto his wife: and they shall be one flesh.&lt;/v&gt;&#13;
+    &lt;v&gt;And they were both naked, the man and his wife, and were not ashamed.&lt;/v&gt;&#13;
+ &lt;/chapter&gt;&#13;
+&lt;/book&gt;</outResult>
+   </testResult>
+   <testResult status="fail" testName="mode-1440">
+      <outResult/>
+   </testResult>
+   <testResult status="fail" testName="mode-1441">
+      <outResult>
+         <errTrace>Illegal value:  s  used for QNAME attribute: name</errTrace>
+         <errTrace>Illegal value:  s  used for QNAME attribute: mode</errTrace>
+         <errTrace>Illegal value: s  used for QNAME attribute: mode</errTrace>
+         <errTrace>Illegal value:  #current  used for QNAME attribute: mode</errTrace>
+         <errTrace>XTTE0505 : An XSL mode instruction's attribute "on-no-match" has disallowed value ' text-only-copy '.</errTrace>
+      </outResult>
+   </testResult>
+   <testResult status="fail" testName="mode-1442">
+      <outResult/>
+   </testResult>
+   <testResult status="fail" testName="mode-1443">
+      <outResult>
+         <errTrace>Illegal value:  s  used for QNAME attribute: name</errTrace>
+         <errTrace>Illegal value:  s  used for QNAME attribute: mode</errTrace>
+         <errTrace>Illegal value: s  used for QNAME attribute: mode</errTrace>
+         <errTrace>Illegal value:  #current  used for QNAME attribute: mode</errTrace>
+         <errTrace>XTTE0505 : An XSL mode instruction's attribute "on-no-match" has disallowed value ' text-only-copy '.</errTrace>
+      </outResult>
+   </testResult>
+   <testResult status="pass" testName="mode-1444"/>
+   <testResult status="pass" testName="mode-1445"/>
+   <testResult status="pass" testName="mode-1446"/>
+   <testResult status="fail" testName="mode-1447">
+      <outResult>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;book&gt;&#13;
+ &lt;bktlong&gt;The First Book of Moses, Called GENESIS.&lt;/bktlong&gt;&#13;
+ &lt;bktshort&gt;Genesis&lt;/bktshort&gt;&#13;
+ &lt;chapter length="4097" nr="1"&gt;&#13;
+    &lt;chtitle&gt;Chapter 1&lt;/chtitle&gt;&#13;
+    &lt;v&gt;In the beginning &lt;deity&gt;God&lt;/deity&gt; created the heaven and the earth.&lt;/v&gt;&#13;
+    &lt;v&gt;And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of &lt;deity&gt;God&lt;/deity&gt; moved upon the face of the waters.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; said, Let there be light: and there was light.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; saw the light, that it was good: and &lt;deity&gt;God&lt;/deity&gt; divided the light from the darkness.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; called the light Day, and the darkness he called Night. And the evening and the morning were the first day.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; said, Let there be a firmament in the midst of the waters, and let it divide the waters from the waters.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; made the firmament, and divided the waters which were under the firmament from the waters which were above the firmament: and it was so.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; called the firmament Heaven. And the evening and the morning were the second day.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; said, Let the waters under the heaven be gathered together unto one place, and let the dry land appear: and it was so.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; called the dry land Earth; and the gathering together of the waters called he Seas: and &lt;deity&gt;God&lt;/deity&gt; saw that it was good.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; said, Let the earth bring forth grass, the herb yielding seed, and the fruit tree yielding fruit after his kind, whose seed is in itself, upon the earth: and it was so.&lt;/v&gt;&#13;
+    &lt;v&gt;And the earth brought forth grass, and herb yielding seed after his kind, and the tree yielding fruit, whose seed was in itself, after his kind: and &lt;deity&gt;God&lt;/deity&gt; saw that it was good.&lt;/v&gt;&#13;
+    &lt;v&gt;And the evening and the morning were the third day.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; said, Let there be lights in the firmament of the heaven to divide the day from the night; and let them be for signs, and for seasons, and for days, and years:&lt;/v&gt;&#13;
+    &lt;v&gt;And let them be for lights in the firmament of the heaven to give light upon the earth: and it was so.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; made two great lights; the greater light to rule the day, and the lesser light to rule the night: he made the stars also.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; set them in the firmament of the heaven to give light upon the earth,&lt;/v&gt;&#13;
+    &lt;v&gt;And to rule over the day and over the night, and to divide the light from the darkness: and &lt;deity&gt;God&lt;/deity&gt; saw that it was good.&lt;/v&gt;&#13;
+    &lt;v&gt;And the evening and the morning were the fourth day.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; said, Let the waters bring forth abundantly the moving creature that hath life, and fowl that may fly above the earth in the open firmament of heaven.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; created great whales, and every living creature that moveth, which the waters brought forth abundantly, after their kind, and every winged fowl after his kind: and &lt;deity&gt;God&lt;/deity&gt; saw that it was good.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; blessed them, saying, Be fruitful, and multiply, and fill the waters in the seas, and let fowl multiply in the earth.&lt;/v&gt;&#13;
+    &lt;v&gt;And the evening and the morning were the fifth day.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; said, Let the earth bring forth the living creature after his kind, cattle, and creeping thing, and beast of the earth after his kind: and it was so.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; made the beast of the earth after his kind, and cattle after their kind, and every thing that creepeth upon the earth after his kind: and &lt;deity&gt;God&lt;/deity&gt; saw that it was good.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; said, Let us make man in our image, after our likeness: and let them have dominion over the fish of the sea, and over the fowl of the air, and over the cattle, and over all the earth, and over every creeping thing that creepeth upon the earth.&lt;/v&gt;&#13;
+    &lt;v&gt;So &lt;deity&gt;God&lt;/deity&gt; created man in his own image, in the image of &lt;deity&gt;God&lt;/deity&gt; created he him; male and female created he them.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; blessed them, and &lt;deity&gt;God&lt;/deity&gt; said unto them, Be fruitful, and multiply, and replenish the earth, and subdue it: and have dominion over the fish of the sea, and over the fowl of the air, and over every living thing that moveth upon the earth.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; said, Behold, I have given you every herb bearing seed, which is upon the face of all the earth, and every tree, in the which is the fruit of a tree yielding seed; to you it shall be for meat.&lt;/v&gt;&#13;
+    &lt;v&gt;And to every beast of the earth, and to every fowl of the air, and to every thing that creepeth upon the earth, wherein there is life, I have given every green herb for meat: and it was so.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; saw every thing that he had made, and, behold, it was very good. And the evening and the morning were the sixth day.&lt;/v&gt;&#13;
+ &lt;/chapter&gt;&#13;
+ &lt;chapter length="3105" nr="2"&gt;&#13;
+    &lt;chtitle&gt;Chapter 2&lt;/chtitle&gt;&#13;
+    &lt;v&gt;Thus the heavens and the earth were finished, and all the host of them.&lt;/v&gt;&#13;
+    &lt;v&gt;And on the seventh day &lt;deity&gt;God&lt;/deity&gt; ended his work which he had made; and he rested on the seventh day from all his work which he had made.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;deity&gt;God&lt;/deity&gt; blessed the seventh day, and sanctified it: because that in it he had rested from all his work which &lt;deity&gt;God&lt;/deity&gt; created and made.&lt;/v&gt;&#13;
+    &lt;v&gt;These are the generations of the heavens and of the earth when they were created, in the day that the LORD &lt;deity&gt;God&lt;/deity&gt; made the earth and the heavens,&lt;/v&gt;&#13;
+    &lt;v&gt;And every plant of the field before it was in the earth, and every herb of the field before it grew: for the LORD &lt;deity&gt;God&lt;/deity&gt; had not caused it to rain upon the earth, and there was not a man to till the ground.&lt;/v&gt;&#13;
+    &lt;v&gt;But there went up a mist from the earth, and watered the whole face of the ground.&lt;/v&gt;&#13;
+    &lt;v&gt;And the LORD &lt;deity&gt;God&lt;/deity&gt; formed man of the dust of the ground, and breathed into his nostrils the breath of life; and man became a living soul.&lt;/v&gt;&#13;
+    &lt;v&gt;And the LORD &lt;deity&gt;God&lt;/deity&gt; planted a garden eastward in &lt;place&gt;Eden&lt;/place&gt;; and there he put the man whom he had formed.&lt;/v&gt;&#13;
+    &lt;v&gt;And out of the ground made the LORD &lt;deity&gt;God&lt;/deity&gt; to grow every tree that is pleasant to the sight, and good for food; the tree of life also in the midst of the garden, and the tree of knowledge of good and evil.&lt;/v&gt;&#13;
+    &lt;v&gt;And a river went out of &lt;place&gt;Eden&lt;/place&gt; to water the garden; and from thence it was parted, and became into four heads.&lt;/v&gt;&#13;
+    &lt;v&gt;The name of the first is &lt;place&gt;Pison&lt;/place&gt;: that is it which compasseth the whole land of &lt;place&gt;Havilah&lt;/place&gt;, where there is gold;&lt;/v&gt;&#13;
+    &lt;v&gt;And the gold of that land is good: there is bdellium and the onyx stone.&lt;/v&gt;&#13;
+    &lt;v&gt;And the name of the second river is &lt;place&gt;Gihon&lt;/place&gt;: the same is it that compasseth the whole land of &lt;place&gt;Ethiopia&lt;/place&gt;.&lt;/v&gt;&#13;
+    &lt;v&gt;And the name of the third river is &lt;place&gt;Hiddekel&lt;/place&gt;: that is it which goeth toward the east of &lt;place&gt;Assyria&lt;/place&gt;. And the fourth river is &lt;place&gt;Euphrates&lt;/place&gt;.&lt;/v&gt;&#13;
+    &lt;v&gt;And the LORD &lt;deity&gt;God&lt;/deity&gt; took the man, and put him into the garden of &lt;place&gt;Eden&lt;/place&gt; to dress it and to keep it.&lt;/v&gt;&#13;
+    &lt;v&gt;And the LORD &lt;deity&gt;God&lt;/deity&gt; commanded the man, saying, Of every tree of the garden thou mayest freely eat:&lt;/v&gt;&#13;
+    &lt;v&gt;But of the tree of the knowledge of good and evil, thou shalt not eat of it: for in the day that thou eatest thereof thou shalt surely die.&lt;/v&gt;&#13;
+    &lt;v&gt;And the LORD &lt;deity&gt;God&lt;/deity&gt; said, It is not good that the man should be alone; I will make him an help meet for him.&lt;/v&gt;&#13;
+    &lt;v&gt;And out of the ground the LORD &lt;deity&gt;God&lt;/deity&gt; formed every beast of the field, and every fowl of the air; and brought them unto &lt;person&gt;Adam&lt;/person&gt; to see what he would call them: and whatsoever &lt;person&gt;Adam&lt;/person&gt; called every living creature, that was the name thereof.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;person&gt;Adam&lt;/person&gt; gave names to all cattle, and to the fowl of the air, and to every beast of the field; but for &lt;person&gt;Adam&lt;/person&gt; there was not found an help meet for him.&lt;/v&gt;&#13;
+    &lt;v&gt;And the LORD &lt;deity&gt;God&lt;/deity&gt; caused a deep sleep to fall upon &lt;person&gt;Adam&lt;/person&gt;, and he slept: and he took one of his ribs, and closed up the flesh instead thereof;&lt;/v&gt;&#13;
+    &lt;v&gt;And the rib, which the LORD &lt;deity&gt;God&lt;/deity&gt; had taken from man, made he a woman, and brought her unto the man.&lt;/v&gt;&#13;
+    &lt;v&gt;And &lt;person&gt;Adam&lt;/person&gt; said, This is now bone of my bones, and flesh of my flesh: she shall be called Woman, because she was taken out of Man.&lt;/v&gt;&#13;
+    &lt;v&gt;Therefore shall a man leave his father and his mother, and shall cleave unto his wife: and they shall be one flesh.&lt;/v&gt;&#13;
+    &lt;v&gt;And they were both naked, the man and his wife, and were not ashamed.&lt;/v&gt;&#13;
+ &lt;/chapter&gt;&#13;
+&lt;/book&gt;</outResult>
+   </testResult>
+   <testResult status="pass" testName="mode-1501"/>
    <testResult status="pass" testName="mode-1502"/>
    <testResult status="pass" testName="mode-1503"/>
    <testResult status="pass" testName="mode-1504"/>
@@ -161,9 +404,13 @@ Z&#13;#unnamed used for QNAME attribute: mode</errTrace>
    <testResult status="fail" testName="mode-1601"/>
    <testResult status="pass" testName="mode-1602"/>
    <testResult status="fail" testName="mode-1603"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1604"/>
+   <testResult status="fail" testName="mode-1604">
+      <outResult/>
+   </testResult>
    <testResult status="pass" testName="mode-1605"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1606"/>
+   <testResult status="fail" testName="mode-1606">
+      <outResult/>
+   </testResult>
    <testResult status="fail" testName="mode-1607"/>
    <testResult status="pass" testName="mode-1608"/>
    <testResult status="fail" testName="mode-1609"/>
@@ -195,12 +442,29 @@ Z&#13;#unnamed used for QNAME attribute: mode</errTrace>
    <testResult feature="xsl:package test case" status="skipped" testName="mode-1712"/>
    <testResult feature="xsl:package test case" status="skipped" testName="mode-1713"/>
    <testResult feature="xsl:package test case" status="skipped" testName="mode-1714err"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1801"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1802"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1803"/>
+   <testResult status="fail" testName="mode-1801">
+      <outResult/>
+   </testResult>
+   <testResult status="fail" testName="mode-1802">
+      <outResult/>
+   </testResult>
+   <testResult status="fail" testName="mode-1803">
+      <outResult>
+         <errTrace>XTSE0010 : xsl:package is not allowed in this position in the stylesheet</errTrace>
+         <errTrace>java.lang.NullPointerException</errTrace>
+      </outResult>
+   </testResult>
    <testResult status="pass" testName="mode-1901"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1902"/>
+   <testResult status="fail" testName="mode-1902">
+      <outResult>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;out&gt;&#13;
+	 	 mode-X (doc): &#13;
+	  inside named-templates: mode-X: brown-fox&lt;/out&gt;</outResult>
+   </testResult>
    <testResult feature="streaming" status="skipped" testName="mode-1903"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1904"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="mode-1905"/>
+   <testResult status="pass" testName="mode-1904"/>
+   <testResult status="fail" testName="mode-1905">
+      <outResult>
+         <errTrace>org.xml.sax.SAXException: XTSE0545 : An XSL stylesheet has more than one XSL 'mode' declaration with name 'X', that have conflicting values for XSL mode attribute 'on-multiple-match'.</errTrace>
+      </outResult>
+   </testResult>
 </testrun>
diff --git a/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/decl/_character-map-test-set_result.xml b/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/decl/_character-map-test-set_result.xml
index bc6cbc6a6..788e96424 100644
--- a/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/decl/_character-map-test-set_result.xml
+++ b/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/decl/_character-map-test-set_result.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="UTF-8"?><testrun dateTime="2025-11-13T16:37:37Z" fail="13" name="character-map" pass="14" skipped="1" statusUnknown="1" totalRun="28">
+<?xml version="1.0" encoding="UTF-8"?><testrun dateTime="2025-11-15T17:36:56Z" fail="14" name="character-map" pass="13" skipped="1" statusUnknown="1" totalRun="28">
    <testResult status="pass" testName="character-map-001"/>
    <testResult status="pass" testName="character-map-002"/>
    <testResult status="pass" testName="character-map-003"/>
    <testResult status="pass" testName="character-map-004"/>
    <testResult status="pass" testName="character-map-005"/>
    <testResult status="pass" testName="character-map-006"/>
-   <testResult status="pass" testName="character-map-007"/>
+   <testResult status="fail" testName="character-map-007"/>
    <testResult status="pass" testName="character-map-008"/>
    <testResult status="pass" testName="character-map-009"/>
    <testResult reason="Xalan configured" status="skipped" testName="character-map-010"/>
diff --git a/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/expr/_expression-test-set_result.xml b/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/expr/_expression-test-set_result.xml
index 4dbc9978a..582c083a1 100644
--- a/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/expr/_expression-test-set_result.xml
+++ b/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/expr/_expression-test-set_result.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?><testrun dateTime="2025-11-13T16:37:38Z" fail="16" name="expression" pass="84" skipped="4" statusUnknown="1" totalRun="101">
+<?xml version="1.0" encoding="UTF-8"?><testrun dateTime="2025-11-15T17:36:57Z" fail="15" name="expression" pass="85" skipped="4" statusUnknown="1" totalRun="101">
    <testResult status="pass" testName="expression-0101"/>
    <testResult status="pass" testName="expression-0301"/>
    <testResult status="pass" testName="expression-0302"/>
@@ -119,7 +119,7 @@
    <testResult status="pass" testName="expression-4208"/>
    <testResult status="pass" testName="expression-4209"/>
    <testResult status="pass" testName="expression-4210"/>
-   <testResult status="fail" testName="expression-4301"/>
+   <testResult status="pass" testName="expression-4301"/>
    <testResult status="pass" testName="expression-4302"/>
    <testResult status="fail" testName="expression-4303">
       <outResult>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;span&gt;false&lt;/span&gt;</outResult>
diff --git a/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/insn/_call-template-test-set_result.xml b/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/insn/_call-template-test-set_result.xml
index c0eedb6d8..80c26b93d 100644
--- a/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/insn/_call-template-test-set_result.xml
+++ b/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/insn/_call-template-test-set_result.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?><testrun dateTime="2025-11-13T16:37:39Z" fail="13" name="call-template" pass="27" skipped="2" statusUnknown="0" totalRun="40">
+<?xml version="1.0" encoding="UTF-8"?><testrun dateTime="2025-11-15T17:36:59Z" fail="12" name="call-template" pass="28" skipped="2" statusUnknown="0" totalRun="40">
    <testResult status="fail" testName="call-template-0001">
       <outResult>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;out/&gt;</outResult>
    </testResult>
@@ -8,7 +8,7 @@
          <errTrace>XTDE0040 : An XSL template named 'foo:temp' doesn't exist.</errTrace>
       </outResult>
    </testResult>
-   <testResult status="fail" testName="call-template-0103"/>
+   <testResult status="pass" testName="call-template-0103"/>
    <testResult status="pass" testName="call-template-0104"/>
    <testResult status="pass" testName="call-template-0105"/>
    <testResult status="fail" testName="call-template-0106">
diff --git a/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/misc/_regex-test-set_result.xml b/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/misc/_regex-test-set_result.xml
index df2eba230..fcceb998d 100644
--- a/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/misc/_regex-test-set_result.xml
+++ b/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/misc/_regex-test-set_result.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?><testrun dateTime="2025-11-13T16:37:43Z" fail="13" name="regex" pass="35" skipped="17" statusUnknown="0" totalRun="48">
+<?xml version="1.0" encoding="UTF-8"?><testrun dateTime="2025-11-15T17:37:03Z" fail="12" name="regex" pass="32" skipped="6" statusUnknown="0" totalRun="44">
    <testResult status="pass" testName="regex-001"/>
    <testResult status="fail" testName="regex-002"/>
    <testResult status="pass" testName="regex-003"/>
@@ -58,24 +58,9 @@
    <testResult status="pass" testName="regex-062"/>
    <testResult status="pass" testName="regex-066"/>
    <testResult status="pass" testName="regex-068"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="regex-070a"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="regex-070b"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="regex-070c"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="regex-070d"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="regex-070e"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="regex-070f"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="regex-070g"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="regex-070h"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="regex-070i"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="regex-070j"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="regex-070k"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="regex-070l"/>
-   <testResult status="pass" testName="regex-071"/>
-   <testResult status="pass" testName="regex-072"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="regex-086a"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="regex-086b"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="regex-086c"/>
-   <testResult feature="XSLT 3.0 'initial mode' test case" status="skipped" testName="regex-086d"/>
-   <testResult status="fail" testName="regex-090"/>
-   <testResult status="pass" testName="regex-091"/>
+   <testResult reason="Xalan configured" status="skipped" testName="regex-070a"/>
+   <testResult reason="Xalan configured" status="skipped" testName="regex-070b"/>
+   <testResult reason="Xalan configured" status="skipped" testName="regex-070c"/>
+   <testResult reason="Xalan configured" status="skipped" testName="regex-070d"/>
+   <testResult reason="Xalan configured" status="skipped" testName="regex-070e"/>
 </testrun>
diff --git a/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/w3c_xslt3_testsuite_xalan-j_result.xml b/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/w3c_xslt3_testsuite_xalan-j_result.xml
index da68fb841..a34f818d4 100644
--- a/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/w3c_xslt3_testsuite_xalan-j_result.xml
+++ b/src/test/java/org/apache/xalan/tests/w3c/xslt3/result/w3c_xslt3_testsuite_xalan-j_result.xml
@@ -1,19 +1,19 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<testResult dateTime="2025-11-13T16:37:58Z" desc="W3C XSLT 3.0 test suite results" fail="944" pass="2372" skipped="620" success="71.38%" totalRun="3323" xslt_processor="Xalan-J XSLT 3.0 development code">
+<testResult dateTime="2025-11-15T17:37:16Z" desc="W3C XSLT 3.0 test suite results" fail="963" pass="2391" skipped="567" success="71.14%" totalRun="3361" xslt_processor="Xalan-J XSLT 3.0 development code">
   <attr>
     <as fail="31" pass="80" skipped="93" success="72.07%" totalRun="111"/>
     <avt fail="14" pass="21" skipped="0" success="60.0%" totalRun="35"/>
-    <disable-output-escaping fail="22" pass="5" skipped="4" success="17.86%" totalRun="28"/>
+    <disable-output-escaping fail="10" pass="16" skipped="5" success="59.26%" totalRun="27"/>
     <expand-text fail="8" pass="51" skipped="3" success="86.44%" totalRun="59"/>
     <match fail="85" pass="96" skipped="112" success="52.75%" totalRun="182"/>
-    <mode fail="26" pass="54" skipped="89" success="67.5%" totalRun="80"/>
+    <mode fail="59" pass="64" skipped="46" success="52.03%" totalRun="123"/>
     <select fail="31" pass="103" skipped="23" success="76.3%" totalRun="135"/>
     <tunnel fail="40" pass="18" skipped="0" success="31.03%" totalRun="58"/>
     <xpath-default-namespace fail="11" pass="11" skipped="4" success="50.0%" totalRun="22"/>
   </attr>
   <decl>
     <attribute-set fail="7" pass="42" skipped="1" success="85.71%" totalRun="49"/>
-    <character-map fail="13" pass="14" skipped="1" success="50.0%" totalRun="28"/>
+    <character-map fail="14" pass="13" skipped="1" success="46.43%" totalRun="28"/>
     <function fail="31" pass="56" skipped="23" success="64.37%" totalRun="87"/>
     <param fail="18" pass="12" skipped="1" success="40.0%" totalRun="30"/>
     <strip-space fail="14" pass="13" skipped="3" success="48.15%" totalRun="27"/>
@@ -23,7 +23,7 @@
   <expr>
     <axes fail="11" pass="189" skipped="2" success="94.5%" totalRun="200"/>
     <castable fail="3" pass="6" skipped="0" success="66.67%" totalRun="9"/>
-    <expression fail="16" pass="84" skipped="4" success="83.17%" totalRun="101"/>
+    <expression fail="15" pass="85" skipped="4" success="84.16%" totalRun="101"/>
     <for fail="1" pass="2" skipped="1" success="66.67%" totalRun="3"/>
     <higher-order-functions fail="36" pass="33" skipped="7" success="47.83%" totalRun="69"/>
     <math fail="25" pass="128" skipped="8" success="83.66%" totalRun="153"/>
@@ -44,7 +44,7 @@
     <analyze-string fail="14" pass="39" skipped="5" success="73.58%" totalRun="53"/>
     <apply-templates fail="15" pass="22" skipped="13" success="59.46%" totalRun="37"/>
     <attribute fail="10" pass="12" skipped="7" success="52.17%" totalRun="23"/>
-    <call-template fail="13" pass="27" skipped="2" success="67.5%" totalRun="40"/>
+    <call-template fail="12" pass="28" skipped="2" success="70.0%" totalRun="40"/>
     <choose fail="6" pass="48" skipped="1" success="88.89%" totalRun="54"/>
     <copy fail="49" pass="76" skipped="23" success="60.8%" totalRun="125"/>
     <element fail="14" pass="15" skipped="0" success="51.72%" totalRun="29"/>
@@ -57,7 +57,7 @@
   </insn>
   <misc>
     <built-in-templates fail="2" pass="3" skipped="1" success="60.0%" totalRun="5"/>
-    <regex fail="13" pass="35" skipped="17" success="72.92%" totalRun="48"/>
+    <regex fail="12" pass="32" skipped="6" success="72.73%" totalRun="44"/>
   </misc>
   <type>
     <boolean fail="1" pass="108" skipped="3" success="99.08%" totalRun="109"/>
diff --git a/src/test/java/org/apache/xalan/tests/xslt3/XslDisableOutputEscapingTests.java b/src/test/java/org/apache/xalan/tests/xslt3/XslDisableOutputEscapingAttrTests.java
similarity index 98%
rename from src/test/java/org/apache/xalan/tests/xslt3/XslDisableOutputEscapingTests.java
rename to src/test/java/org/apache/xalan/tests/xslt3/XslDisableOutputEscapingAttrTests.java
index 3a0422776..5221ec457 100644
--- a/src/test/java/org/apache/xalan/tests/xslt3/XslDisableOutputEscapingTests.java
+++ b/src/test/java/org/apache/xalan/tests/xslt3/XslDisableOutputEscapingAttrTests.java
@@ -30,7 +30,7 @@ import org.junit.Test;
  * 
  * @xsl.usage advanced
  */
-public class XslDisableOutputEscapingTests extends XslTransformTestsUtil {
+public class XslDisableOutputEscapingAttrTests extends XslTransformTestsUtil {
     
     private static final String XSL_TRANSFORM_INPUT_DIRPATH = XSLTestConstants.XSL_TRANSFORM_INPUT_DIRPATH_PREFIX + "xsl_disable_output_escaping/";
     


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