You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mu...@apache.org on 2023/06/14 10:40:49 UTC
[xalan-java] branch xalan-j_xslt3.0 updated: adding few new working test cases, from w3c xslt 3.0 test suite related to xpath axes
This is an automated email from the ASF dual-hosted git repository.
mukulg pushed a commit to branch xalan-j_xslt3.0
in repository https://gitbox.apache.org/repos/asf/xalan-java.git
The following commit(s) were added to refs/heads/xalan-j_xslt3.0 by this push:
new 18b55229 adding few new working test cases, from w3c xslt 3.0 test suite related to xpath axes
18b55229 is described below
commit 18b552297ea112b8f95ce78d09fbefff64a7fadf
Author: Mukul Gandhi <ga...@gmail.com>
AuthorDate: Wed Jun 14 16:10:32 2023 +0530
adding few new working test cases, from w3c xslt 3.0 test suite related to xpath axes
---
src/org/apache/xalan/templates/ElemIterate.java | 20 +-
.../xalan/templates/ElemIterateNextIteration.java | 18 +-
tests/org/apache/xalan/xslt3/AllXsl3Tests.java | 2 +-
.../apache/xalan/xslt3/W3c_xslt30_AxesTests.java | 221 +++++++++++++++++++++
tests/w3c_xslt30_testsuite/axes/axes-001.xsl | 19 ++
tests/w3c_xslt30_testsuite/axes/axes-002.xsl | 19 ++
tests/w3c_xslt30_testsuite/axes/axes-003.xsl | 16 ++
tests/w3c_xslt30_testsuite/axes/axes-004.xsl | 19 ++
tests/w3c_xslt30_testsuite/axes/axes-005.xsl | 19 ++
tests/w3c_xslt30_testsuite/axes/axes-006.xsl | 18 ++
tests/w3c_xslt30_testsuite/axes/axes-007.xsl | 18 ++
tests/w3c_xslt30_testsuite/axes/axes-008.xsl | 18 ++
tests/w3c_xslt30_testsuite/axes/axes-009.xsl | 18 ++
tests/w3c_xslt30_testsuite/axes/axes-010.xsl | 18 ++
tests/w3c_xslt30_testsuite/axes/axes-011.xsl | 18 ++
tests/w3c_xslt30_testsuite/axes/axes-012.xsl | 18 ++
tests/w3c_xslt30_testsuite/axes/axes-013.xsl | 18 ++
tests/w3c_xslt30_testsuite/axes/axes-014.xsl | 18 ++
tests/w3c_xslt30_testsuite/axes/axes-015.xsl | 19 ++
tests/w3c_xslt30_testsuite/axes/axes-031.xsl | 20 ++
tests/w3c_xslt30_testsuite/axes/axes-032.xsl | 18 ++
tests/w3c_xslt30_testsuite/axes/axes001.xml | 12 ++
tests/w3c_xslt30_testsuite/axes/axes002.xml | 12 ++
tests/w3c_xslt30_testsuite/axes/axes003.xml | 12 ++
tests/w3c_xslt30_testsuite/axes/axes004.xml | 13 ++
tests/w3c_xslt30_testsuite/axes/gold/test1.out | 1 +
tests/w3c_xslt30_testsuite/axes/gold/test10.out | 1 +
tests/w3c_xslt30_testsuite/axes/gold/test11.out | 1 +
tests/w3c_xslt30_testsuite/axes/gold/test12.out | 1 +
tests/w3c_xslt30_testsuite/axes/gold/test13.out | 1 +
tests/w3c_xslt30_testsuite/axes/gold/test14.out | 1 +
tests/w3c_xslt30_testsuite/axes/gold/test15.out | 1 +
tests/w3c_xslt30_testsuite/axes/gold/test16.out | 1 +
tests/w3c_xslt30_testsuite/axes/gold/test17.out | 1 +
tests/w3c_xslt30_testsuite/axes/gold/test2.out | 1 +
tests/w3c_xslt30_testsuite/axes/gold/test3.out | 1 +
tests/w3c_xslt30_testsuite/axes/gold/test4.out | 1 +
tests/w3c_xslt30_testsuite/axes/gold/test5.out | 1 +
tests/w3c_xslt30_testsuite/axes/gold/test6.out | 1 +
tests/w3c_xslt30_testsuite/axes/gold/test7.out | 1 +
tests/w3c_xslt30_testsuite/axes/gold/test8.out | 1 +
tests/w3c_xslt30_testsuite/axes/gold/test9.out | 1 +
42 files changed, 618 insertions(+), 20 deletions(-)
diff --git a/src/org/apache/xalan/templates/ElemIterate.java b/src/org/apache/xalan/templates/ElemIterate.java
index 98f0e64c..9ee7c2b1 100644
--- a/src/org/apache/xalan/templates/ElemIterate.java
+++ b/src/org/apache/xalan/templates/ElemIterate.java
@@ -383,15 +383,15 @@ public class ElemIterate extends ElemTemplateElement implements ExpressionOwner
ElemParam paramElem = (ElemParam)elemTemplate;
QName paramNameVal = paramElem.getName();
XPath paramSelectXPath = paramElem.getSelect();
- ParamWithparamData paramWithParmDataObj = new ParamWithparamData();
- paramWithParmDataObj.setNameVal(paramNameVal);
- paramWithParmDataObj.setSelectVal(paramSelectXPath);
- if (fParamList.contains(paramWithParmDataObj)) {
+ ParamWithparamData paramWithparamDataObj = new ParamWithparamData();
+ paramWithparamDataObj.setNameVal(paramNameVal);
+ paramWithparamDataObj.setSelectVal(paramSelectXPath);
+ if (fParamList.contains(paramWithparamDataObj)) {
throw new TransformerException("XTSE0580 : the name of the xsl:param parameter '" + paramNameVal + "' "
+ "is not unique.", xctxt.getSAXLocator());
}
else {
- fParamList.add(paramWithParmDataObj);
+ fParamList.add(paramWithparamDataObj);
}
}
else if (elemTemplate instanceof ElemIterateNextIteration) {
@@ -403,15 +403,15 @@ public class ElemIterate extends ElemTemplateElement implements ExpressionOwner
ElemWithParam withParamElem = (ElemWithParam)nextIterChild;
QName withParamNameVal = withParamElem.getName();
XPath withParamSelectXPath = withParamElem.getSelect();
- ParamWithparamData paramWithParmDataObj = new ParamWithparamData();
- paramWithParmDataObj.setNameVal(withParamNameVal);
- paramWithParmDataObj.setSelectVal(withParamSelectXPath);
- if (fWithparamList.contains(paramWithParmDataObj)) {
+ ParamWithparamData paramWithparamDataObj = new ParamWithparamData();
+ paramWithparamDataObj.setNameVal(withParamNameVal);
+ paramWithparamDataObj.setSelectVal(withParamSelectXPath);
+ if (fWithparamList.contains(paramWithparamDataObj)) {
throw new TransformerException("XTSE0670 : duplicate xsl:with-param parameter name '" + withParamNameVal +
"'", xctxt.getSAXLocator());
}
else {
- fWithparamList.add(paramWithParmDataObj);
+ fWithparamList.add(paramWithparamDataObj);
}
}
}
diff --git a/src/org/apache/xalan/templates/ElemIterateNextIteration.java b/src/org/apache/xalan/templates/ElemIterateNextIteration.java
index 56b56b6d..f8c9ed8c 100644
--- a/src/org/apache/xalan/templates/ElemIterateNextIteration.java
+++ b/src/org/apache/xalan/templates/ElemIterateNextIteration.java
@@ -118,11 +118,11 @@ public class ElemIterateNextIteration extends ElemTemplateElement implements Exp
super.endCompose(sroot);
}
- /**
- * Get an int constant identifying the type of element.
- * @see org.apache.xalan.templates.Constants
- *
- * @return The token ID for this element
+ /**
+ * Get an int constant identifying the type of element.
+ * @see org.apache.xalan.templates.Constants
+ *
+ * @return The token ID for this element
*/
public int getXSLToken()
{
@@ -148,7 +148,7 @@ public class ElemIterateNextIteration extends ElemTemplateElement implements Exp
*/
public void execute(TransformerImpl transformer) throws TransformerException
{
- transformSelectedNodes(transformer);
+ elemIterateNextIterationProcessing(transformer);
}
/**
@@ -158,9 +158,9 @@ public class ElemIterateNextIteration extends ElemTemplateElement implements Exp
*
* @xsl.usage advanced
*/
- public void transformSelectedNodes(TransformerImpl transformer) throws
- TransformerException {
- // TO DO
+ public void elemIterateNextIterationProcessing(TransformerImpl transformer) throws
+ TransformerException {
+ // no op
}
}
diff --git a/tests/org/apache/xalan/xslt3/AllXsl3Tests.java b/tests/org/apache/xalan/xslt3/AllXsl3Tests.java
index 7b9ccd26..1a4b27ae 100644
--- a/tests/org/apache/xalan/xslt3/AllXsl3Tests.java
+++ b/tests/org/apache/xalan/xslt3/AllXsl3Tests.java
@@ -47,7 +47,7 @@ import org.junit.runners.Suite.SuiteClasses;
FnUnparsedTextTests.class, FnTokenizeTests.class, FnStringJoinTests.class,
FnAbsTests.class, StringTests.class, XsConstructorFunctions.class,
FnIndexOfTests.class, SequenceTests.class, RangeExprTests.class,
- W3c_xslt30_IterateTests.class, XslIterateTests.class })
+ W3c_xslt30_IterateTests.class, W3c_xslt30_AxesTests.class, XslIterateTests.class })
public class AllXsl3Tests {
}
diff --git a/tests/org/apache/xalan/xslt3/W3c_xslt30_AxesTests.java b/tests/org/apache/xalan/xslt3/W3c_xslt30_AxesTests.java
new file mode 100644
index 00000000..76bacb5e
--- /dev/null
+++ b/tests/org/apache/xalan/xslt3/W3c_xslt30_AxesTests.java
@@ -0,0 +1,221 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.xalan.xslt3;
+
+import org.apache.xalan.util.XslTransformTestsUtil;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * XSLT 3.0 test cases for the XPath axes.
+ *
+ * @author Mukul Gandhi <mu...@apache.org>
+ *
+ * @xsl.usage advanced
+ */
+public class W3c_xslt30_AxesTests extends XslTransformTestsUtil {
+
+ private static final String XSL_TRANSFORM_INPUT_DIRPATH = XSLConstants.XSL_TRANSFORM_INPUT_DIRPATH_PREFIX +
+ "w3c_xslt30_testsuite/axes/";
+
+ private static final String XSL_TRANSFORM_GOLD_DIRPATH = XSLConstants.XSL_TRANSFORM_GOLD_DIRPATH_PREFIX +
+ "w3c_xslt30_testsuite/axes/gold/";
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ // no op
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ xmlDocumentBuilderFactory = null;
+ xmlDocumentBuilder = null;
+ xslTransformerFactory = null;
+ }
+
+ @Test
+ public void xslAxesTest1() {
+ String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes001.xml";
+ String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes-001.xsl";
+
+ String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test1.out";
+
+ runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+ }
+
+ @Test
+ public void xslAxesTest2() {
+ String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes002.xml";
+ String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes-002.xsl";
+
+ String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test2.out";
+
+ runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+ }
+
+ @Test
+ public void xslAxesTest3() {
+ String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes002.xml";
+ String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes-003.xsl";
+
+ String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test3.out";
+
+ runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+ }
+
+ @Test
+ public void xslAxesTest4() {
+ String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes002.xml";
+ String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes-004.xsl";
+
+ String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test4.out";
+
+ runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+ }
+
+ @Test
+ public void xslAxesTest5() {
+ String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes002.xml";
+ String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes-005.xsl";
+
+ String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test5.out";
+
+ runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+ }
+
+ @Test
+ public void xslAxesTest6() {
+ String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes002.xml";
+ String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes-006.xsl";
+
+ String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test6.out";
+
+ runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+ }
+
+ @Test
+ public void xslAxesTest7() {
+ String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes002.xml";
+ String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes-007.xsl";
+
+ String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test7.out";
+
+ runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+ }
+
+ @Test
+ public void xslAxesTest8() {
+ String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes002.xml";
+ String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes-008.xsl";
+
+ String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test8.out";
+
+ runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+ }
+
+ @Test
+ public void xslAxesTest9() {
+ String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes002.xml";
+ String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes-009.xsl";
+
+ String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test9.out";
+
+ runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+ }
+
+ @Test
+ public void xslAxesTest10() {
+ String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes002.xml";
+ String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes-010.xsl";
+
+ String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test10.out";
+
+ runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+ }
+
+ @Test
+ public void xslAxesTest11() {
+ String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes002.xml";
+ String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes-011.xsl";
+
+ String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test11.out";
+
+ runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+ }
+
+ @Test
+ public void xslAxesTest12() {
+ String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes002.xml";
+ String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes-012.xsl";
+
+ String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test12.out";
+
+ runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+ }
+
+ @Test
+ public void xslAxesTest13() {
+ String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes002.xml";
+ String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes-013.xsl";
+
+ String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test13.out";
+
+ runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+ }
+
+ @Test
+ public void xslAxesTest14() {
+ String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes002.xml";
+ String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes-014.xsl";
+
+ String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test14.out";
+
+ runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+ }
+
+ @Test
+ public void xslAxesTest15() {
+ String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes002.xml";
+ String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes-015.xsl";
+
+ String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test15.out";
+
+ runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+ }
+
+ @Test
+ public void xslAxesTest16() {
+ String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes003.xml";
+ String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes-031.xsl";
+
+ String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test16.out";
+
+ runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+ }
+
+ @Test
+ public void xslAxesTest17() {
+ String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes004.xml";
+ String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "axes-032.xsl";
+
+ String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test17.out";
+
+ runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, null);
+ }
+
+}
diff --git a/tests/w3c_xslt30_testsuite/axes/axes-001.xsl b/tests/w3c_xslt30_testsuite/axes/axes-001.xsl
new file mode 100644
index 00000000..21dd04e7
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes-001.xsl
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+ <!-- PURPOSE: Test for 'ancestor::' Axis Identifier. -->
+
+ <xsl:output method="xml" indent="yes"/>
+
+ <xsl:template match="/">
+ <out>
+ <xsl:for-each select="//center">
+ <xsl:apply-templates select="ancestor::*"/>
+ </xsl:for-each>
+ </out>
+ </xsl:template>
+
+ <xsl:template match="*">
+ <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/w3c_xslt30_testsuite/axes/axes-002.xsl b/tests/w3c_xslt30_testsuite/axes/axes-002.xsl
new file mode 100644
index 00000000..70d5ae1a
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes-002.xsl
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<?spec xpath#axes?>
+ <!-- PURPOSE: Test for 'ancestor-or-self::' Axis Identifier -->
+<xsl:template match="/">
+
+ <out>
+ <xsl:for-each select="//center">
+ <xsl:apply-templates select="ancestor-or-self::*"/>
+ </xsl:for-each>
+ </out>
+</xsl:template>
+
+<xsl:template match="*">
+ <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/w3c_xslt30_testsuite/axes/axes-003.xsl b/tests/w3c_xslt30_testsuite/axes/axes-003.xsl
new file mode 100644
index 00000000..dc7cebe6
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes-003.xsl
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+ <!-- PURPOSE: Test for 'ancestor::' Axis Identifier with index. -->
+ <xsl:template match="/">
+ <out>
+ <xsl:for-each select="//center">
+ <xsl:apply-templates select="ancestor::*[3]"/>
+ </xsl:for-each>
+ </out>
+ </xsl:template>
+
+ <xsl:template match="*">
+ <xsl:value-of select="name(.)"/>
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/axes-004.xsl b/tests/w3c_xslt30_testsuite/axes/axes-004.xsl
new file mode 100644
index 00000000..8a72ae92
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes-004.xsl
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<?spec xpath#axes?>
+ <!-- PURPOSE: Test for 'ancestor-or-self::' Axis Identifier with index. -->
+<xsl:template match="/">
+
+ <out>
+ <xsl:for-each select="//center">
+ <xsl:apply-templates select="ancestor-or-self::*[1]"/>
+ </xsl:for-each>
+ </out>
+</xsl:template>
+
+<xsl:template match="*">
+ <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/w3c_xslt30_testsuite/axes/axes-005.xsl b/tests/w3c_xslt30_testsuite/axes/axes-005.xsl
new file mode 100644
index 00000000..a17fad57
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes-005.xsl
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<?spec xpath#axes?>
+ <!-- PURPOSE: Test for 'attribute::' Axis Identifier with index. -->
+<xsl:template match="/">
+ <!--Test for 'attribute::' Axis Identifier.-->
+ <out>
+ <xsl:for-each select="//center">
+ <xsl:apply-templates select="attribute::*[2]"/>
+ </xsl:for-each>
+ </out>
+</xsl:template>
+
+<xsl:template match="*|@*">
+ <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/w3c_xslt30_testsuite/axes/axes-006.xsl b/tests/w3c_xslt30_testsuite/axes/axes-006.xsl
new file mode 100644
index 00000000..c5557c20
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes-006.xsl
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<?spec xpath#abbrev?>
+ <!-- PURPOSE: Test for '@*' abbreviated syntax. -->
+<xsl:template match="/">
+ <out>
+ <xsl:for-each select="//center">
+ <xsl:apply-templates select="@*"/>
+ </xsl:for-each>
+ </out>
+</xsl:template>
+
+<xsl:template match="*|@*">
+ <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/w3c_xslt30_testsuite/axes/axes-007.xsl b/tests/w3c_xslt30_testsuite/axes/axes-007.xsl
new file mode 100644
index 00000000..df2f6314
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes-007.xsl
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<?spec xpath#abbrev?>
+ <!-- PURPOSE: Test for '@*' abbreviated syntax with index. -->
+<xsl:template match="/">
+ <out>
+ <xsl:for-each select="//center">
+ <xsl:apply-templates select="@*[2]"/>
+ </xsl:for-each>
+ </out>
+</xsl:template>
+
+<xsl:template match="*|@*">
+ <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/w3c_xslt30_testsuite/axes/axes-008.xsl b/tests/w3c_xslt30_testsuite/axes/axes-008.xsl
new file mode 100644
index 00000000..3638e03c
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes-008.xsl
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<?spec xpath#axes?>
+ <!-- PURPOSE: Test for 'child::' Axis Identifier with wildcard and index. -->
+<xsl:template match="/">
+ <out>
+ <xsl:for-each select="//center">
+ <xsl:apply-templates select="child::*[2]"/>
+ </xsl:for-each>
+ </out>
+</xsl:template>
+
+<xsl:template match="*">
+ <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/w3c_xslt30_testsuite/axes/axes-009.xsl b/tests/w3c_xslt30_testsuite/axes/axes-009.xsl
new file mode 100644
index 00000000..c72814d6
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes-009.xsl
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+ <?spec xpath#axes?>
+ <!-- PURPOSE: Test for 'child::' Axis Identifier with element name. -->
+<xsl:template match="/">
+ <out>
+ <xsl:for-each select="//center">
+ <xsl:apply-templates select="child::near-south-west"/>
+ </xsl:for-each>
+ </out>
+</xsl:template>
+
+<xsl:template match="*">
+ <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/w3c_xslt30_testsuite/axes/axes-010.xsl b/tests/w3c_xslt30_testsuite/axes/axes-010.xsl
new file mode 100644
index 00000000..fdf8a157
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes-010.xsl
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<?spec xpath#axes?>
+ <!-- PURPOSE: Test for 'descendant::' Axis Identifier with wildcard and index. -->
+<xsl:template match="/">
+ <out>
+ <xsl:for-each select="//center">
+ <xsl:apply-templates select="descendant::*[3]"/>
+ </xsl:for-each>
+ </out>
+</xsl:template>
+
+<xsl:template match="*">
+ <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/w3c_xslt30_testsuite/axes/axes-011.xsl b/tests/w3c_xslt30_testsuite/axes/axes-011.xsl
new file mode 100644
index 00000000..d7f63e57
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes-011.xsl
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<?spec xpath#axes?>
+ <!-- PURPOSE: Test for 'descendant::' Axis Identifier with specified element name. -->
+<xsl:template match="/">
+ <out>
+ <xsl:for-each select="//center">
+ <xsl:apply-templates select="descendant::far-south"/>
+ </xsl:for-each>
+ </out>
+</xsl:template>
+
+<xsl:template match="*">
+ <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/w3c_xslt30_testsuite/axes/axes-012.xsl b/tests/w3c_xslt30_testsuite/axes/axes-012.xsl
new file mode 100644
index 00000000..cec0e54b
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes-012.xsl
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<?spec xpath#axes?>
+ <!-- PURPOSE: Test for 'descendant-or-self::' Axis Identifier with wildcard and index. -->
+<xsl:template match="/">
+ <out>
+ <xsl:for-each select="//center">
+ <xsl:apply-templates select="descendant-or-self::*[3]"/>
+ </xsl:for-each>
+ </out>
+</xsl:template>
+
+<xsl:template match="*">
+ <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/w3c_xslt30_testsuite/axes/axes-013.xsl b/tests/w3c_xslt30_testsuite/axes/axes-013.xsl
new file mode 100644
index 00000000..4bd46133
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes-013.xsl
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<?spec xpath#axes?>
+ <!-- PURPOSE: Test for 'descendant-or-self::' Axis Identifier with specified element name. -->
+<xsl:template match="/">
+ <out>
+ <xsl:for-each select="//center">
+ <xsl:apply-templates select="descendant-or-self::far-south"/>
+ </xsl:for-each>
+ </out>
+</xsl:template>
+
+<xsl:template match="*">
+ <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/w3c_xslt30_testsuite/axes/axes-014.xsl b/tests/w3c_xslt30_testsuite/axes/axes-014.xsl
new file mode 100644
index 00000000..2680aae9
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes-014.xsl
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<?spec xpath#axes?>
+ <!-- PURPOSE: Test for 'descendant-or-self::' Axis Identifier with self specified. -->
+<xsl:template match="/">
+ <out>
+ <xsl:for-each select="//center">
+ <xsl:apply-templates select="descendant-or-self::center"/>
+ </xsl:for-each>
+ </out>
+</xsl:template>
+
+<xsl:template match="*">
+ <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/w3c_xslt30_testsuite/axes/axes-015.xsl b/tests/w3c_xslt30_testsuite/axes/axes-015.xsl
new file mode 100644
index 00000000..2dac789a
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes-015.xsl
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<?spec xpath#axes?>
+ <!-- PURPOSE: Test for 'following::' Axis Identifier with wildcard and index. -->
+<xsl:template match="/">
+ <!--Test for 'following::' Axis Identifier.-->
+ <out>
+ <xsl:for-each select="//center">
+ <xsl:apply-templates select="following::*[4]"/>
+ </xsl:for-each>
+ </out>
+</xsl:template>
+
+<xsl:template match="*">
+ <xsl:value-of select="name(.)"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/w3c_xslt30_testsuite/axes/axes-031.xsl b/tests/w3c_xslt30_testsuite/axes/axes-031.xsl
new file mode 100644
index 00000000..1808426d
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes-031.xsl
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<?spec xpath#axes?>
+ <!-- PURPOSE: Test for 'attribute::' Axis Identifier. -->
+<xsl:template match="/">
+ <out>
+ <xsl:for-each select="//center">
+ <xsl:apply-templates select="attribute::*">
+ <xsl:sort select="name()"/>
+ </xsl:apply-templates>
+ </xsl:for-each>
+ </out>
+</xsl:template>
+
+<xsl:template match="*|@*">
+ <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/w3c_xslt30_testsuite/axes/axes-032.xsl b/tests/w3c_xslt30_testsuite/axes/axes-032.xsl
new file mode 100644
index 00000000..13c4943e
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes-032.xsl
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
+
+<?spec xpath#axes?>
+ <!-- PURPOSE: Test for 'child::' Axis Identifier with wildcard. -->
+<xsl:template match="/">
+ <out>
+ <xsl:for-each select="//center">
+ <xsl:apply-templates select="child::*"/>
+ </xsl:for-each>
+ </out>
+</xsl:template>
+
+<xsl:template match="*">
+ <xsl:value-of select="name(.)"/><xsl:text> </xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/w3c_xslt30_testsuite/axes/axes001.xml b/tests/w3c_xslt30_testsuite/axes/axes001.xml
new file mode 100644
index 00000000..d6f044b4
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes001.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?> <far-north>
+<north>
+<near-north><far-west/>
+<west/>
+<near-west/>
+<center>
+<near-south>
+<south>
+<far-south/>></south></near-south></center><near-east/>
+<east/>
+<far-east/>
+</near-north></north></far-north>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/axes002.xml b/tests/w3c_xslt30_testsuite/axes/axes002.xml
new file mode 100644
index 00000000..38c006b8
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes002.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
<far-north>
+<north>
+<near-north>
<far-west/>
+<west/>
+<near-west/>
+<center>
+<near-south>
+<south>
+<far-south/>>
</south>
</near-south>
</center>
<near-east/>
+<east/>
+<far-east/>
+</near-north>
</north>
</far-north>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/axes003.xml b/tests/w3c_xslt30_testsuite/axes/axes003.xml
new file mode 100644
index 00000000..641d2a21
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes003.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
<far-north>
+<north>
+<near-north>
<far-west/>
+<west/>
+<near-west/>
+<center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
+<near-south>
+<south>
+<far-south/>>
</south>
</near-south>
</center>
<near-east/>
+<east/>
+<far-east/>
+</near-north>
</north>
</far-north>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/axes004.xml b/tests/w3c_xslt30_testsuite/axes/axes004.xml
new file mode 100644
index 00000000..4088c90e
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/axes004.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
<far-north>
+<north>
+<near-north>
<far-west/>
+<west/>
+<near-west/>
+<center center-attr-1="c1" center-attr-2="c2" center-attr-3="c3">
<near-south-east/>
+<near-south>
+<south>
+<far-south/>
</south>
</near-south>
+<near-south-west/>
</center>
<near-east/>
+<east/>
+<far-east/>
+</near-north>
</north>
</far-north>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/gold/test1.out b/tests/w3c_xslt30_testsuite/axes/gold/test1.out
new file mode 100644
index 00000000..2005fbe6
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/gold/test1.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out>far-north north near-north </out>
diff --git a/tests/w3c_xslt30_testsuite/axes/gold/test10.out b/tests/w3c_xslt30_testsuite/axes/gold/test10.out
new file mode 100644
index 00000000..47eeec90
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/gold/test10.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out>far-south</out>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/gold/test11.out b/tests/w3c_xslt30_testsuite/axes/gold/test11.out
new file mode 100644
index 00000000..47eeec90
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/gold/test11.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out>far-south</out>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/gold/test12.out b/tests/w3c_xslt30_testsuite/axes/gold/test12.out
new file mode 100644
index 00000000..60dad25b
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/gold/test12.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out>south</out>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/gold/test13.out b/tests/w3c_xslt30_testsuite/axes/gold/test13.out
new file mode 100644
index 00000000..47eeec90
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/gold/test13.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out>far-south</out>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/gold/test14.out b/tests/w3c_xslt30_testsuite/axes/gold/test14.out
new file mode 100644
index 00000000..06cf861c
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/gold/test14.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out>center</out>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/gold/test15.out b/tests/w3c_xslt30_testsuite/axes/gold/test15.out
new file mode 100644
index 00000000..9aa81f1c
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/gold/test15.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out/>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/gold/test16.out b/tests/w3c_xslt30_testsuite/axes/gold/test16.out
new file mode 100644
index 00000000..64f275f9
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/gold/test16.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out>center-attr-1 center-attr-2 center-attr-3 </out>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/gold/test17.out b/tests/w3c_xslt30_testsuite/axes/gold/test17.out
new file mode 100644
index 00000000..131a3aa4
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/gold/test17.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out>near-south-east near-south near-south-west </out>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/gold/test2.out b/tests/w3c_xslt30_testsuite/axes/gold/test2.out
new file mode 100644
index 00000000..41f2c8f4
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/gold/test2.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out>far-north north near-north center </out>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/gold/test3.out b/tests/w3c_xslt30_testsuite/axes/gold/test3.out
new file mode 100644
index 00000000..6feade8e
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/gold/test3.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out>far-north</out>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/gold/test4.out b/tests/w3c_xslt30_testsuite/axes/gold/test4.out
new file mode 100644
index 00000000..06cf861c
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/gold/test4.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out>center</out>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/gold/test5.out b/tests/w3c_xslt30_testsuite/axes/gold/test5.out
new file mode 100644
index 00000000..9aa81f1c
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/gold/test5.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out/>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/gold/test6.out b/tests/w3c_xslt30_testsuite/axes/gold/test6.out
new file mode 100644
index 00000000..9aa81f1c
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/gold/test6.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out/>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/gold/test7.out b/tests/w3c_xslt30_testsuite/axes/gold/test7.out
new file mode 100644
index 00000000..9aa81f1c
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/gold/test7.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out/>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/gold/test8.out b/tests/w3c_xslt30_testsuite/axes/gold/test8.out
new file mode 100644
index 00000000..9aa81f1c
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/gold/test8.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out/>
\ No newline at end of file
diff --git a/tests/w3c_xslt30_testsuite/axes/gold/test9.out b/tests/w3c_xslt30_testsuite/axes/gold/test9.out
new file mode 100644
index 00000000..9aa81f1c
--- /dev/null
+++ b/tests/w3c_xslt30_testsuite/axes/gold/test9.out
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><out/>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xalan.apache.org
For additional commands, e-mail: commits-help@xalan.apache.org