[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xalan-cvs
Subject:    [xalan-java] branch xalan-j_xslt3.0 updated: adding few xslt 3.0 working test cases, illustrating qu
From:       mukulg () apache ! org
Date:       2023-05-31 11:51:03
Message-ID: 168553386378.3916497.14254749781054086877 () gitbox2-he-fi ! apache ! org
[Download RAW message or body]

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 20cad171 adding few xslt 3.0 working test cases, illustrating quantified \
expression evaluations 20cad171 is described below

commit 20cad1719c1ecc53c70555f51d0a784e7dd1959c
Author: Mukul Gandhi <gandhi.mukul@gmail.com>
AuthorDate: Wed May 31 17:19:59 2023 +0530

    adding few xslt 3.0 working test cases, illustrating quantified expression \
                evaluations
---
 tests/org/apache/xalan/xslt3/AllXsl3Tests.java     |   2 +-
 .../apache/xalan/xslt3/QuantifiedExprTests.java    | 100 +++++++++++++++++++++
 tests/quantified_expr/gold/test1.out               |   2 +
 tests/quantified_expr/gold/test2.out               |   1 +
 tests/quantified_expr/gold/test3.out               |   2 +
 tests/quantified_expr/gold/test4.out               |   1 +
 tests/quantified_expr/gold/test5.out               |   2 +
 tests/quantified_expr/test1.xsl                    |  63 +++++++++++++
 tests/quantified_expr/test1_a.xml                  |  29 ++++++
 tests/quantified_expr/test1_b.xml                  |  19 ++++
 tests/quantified_expr/test1_c.xml                  |  37 ++++++++
 tests/quantified_expr/test2.xsl                    |  51 +++++++++++
 tests/quantified_expr/test3.xsl                    |  57 ++++++++++++
 tests/quantified_expr/test4.xsl                    |  51 +++++++++++
 tests/quantified_expr/test5.xsl                    |  66 ++++++++++++++
 15 files changed, 482 insertions(+), 1 deletion(-)

diff --git a/tests/org/apache/xalan/xslt3/AllXsl3Tests.java \
b/tests/org/apache/xalan/xslt3/AllXsl3Tests.java index d2fc53e2..9ff8936c 100644
--- a/tests/org/apache/xalan/xslt3/AllXsl3Tests.java
+++ b/tests/org/apache/xalan/xslt3/AllXsl3Tests.java
@@ -41,7 +41,7 @@ import org.junit.runners.Suite.SuiteClasses;
 @SuiteClasses({ AnalyzeStringTests.class, AttributeTests.class, GroupingTests.class,
                 GroupingWithSortTests.class, RtfMigrationTests.class, 
                 FnUnparsedTextTests.class, FnTokenizeTests.class, \
                FnStringJoinTests.class,
-                FnAbsTests.class, StringTests.class })
+                FnAbsTests.class, StringTests.class, QuantifiedExprTests.class })
 public class AllXsl3Tests {
 
 }
diff --git a/tests/org/apache/xalan/xslt3/QuantifiedExprTests.java \
b/tests/org/apache/xalan/xslt3/QuantifiedExprTests.java new file mode 100644
index 00000000..41a98101
--- /dev/null
+++ b/tests/org/apache/xalan/xslt3/QuantifiedExprTests.java
@@ -0,0 +1,100 @@
+/*
+ * 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, illustrating simulating the XPath 3.1 quantified 
+ * expressions.
+ * 
+ * @author Mukul Gandhi <mukulg@apache.org>
+ * 
+ * @xsl.usage advanced
+ */
+public class QuantifiedExprTests extends XslTransformTestsUtil {       
+    
+    private static final String XSL_TRANSFORM_INPUT_DIRPATH = \
XSLConstants.XSL_TRANSFORM_INPUT_DIRPATH_PREFIX + "quantified_expr/"; +    
+    private static final String XSL_TRANSFORM_GOLD_DIRPATH = \
XSLConstants.XSL_TRANSFORM_GOLD_DIRPATH_PREFIX + "quantified_expr/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 xslQuantifiedExprTest1() {
+        String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test1_a.xml"; 
+        String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test1.xsl";
+        
+        String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test1.out";              \
 +        
+        runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, \
null); +    }
+    
+    @Test
+    public void xslQuantifiedExprTest2() {
+        String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test1_b.xml"; 
+        String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test2.xsl";
+        
+        String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test2.out";              \
 +        
+        runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, \
null);   +    }
+    
+    @Test
+    public void xslQuantifiedExprTest3() {
+        String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test1_c.xml"; 
+        String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test3.xsl";
+        
+        String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test3.out";
+        
+        runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, \
null);    +    }
+    
+    @Test
+    public void xslQuantifiedExprTest4() {
+        String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test1_c.xml"; 
+        String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test4.xsl";
+        
+        String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test4.out";              \
 +        
+        runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, \
null);       +    }
+    
+    @Test
+    public void xslQuantifiedExprTest5() {
+        String xmlFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test1_c.xml"; 
+        String xslFilePath = XSL_TRANSFORM_INPUT_DIRPATH + "test5.xsl";
+        
+        String goldFilePath = XSL_TRANSFORM_GOLD_DIRPATH + "test5.out";              \
 +        
+        runXslTransformAndAssertOutput(xmlFilePath, xslFilePath, goldFilePath, \
null); +    }
+
+}
diff --git a/tests/quantified_expr/gold/test1.out \
b/tests/quantified_expr/gold/test1.out new file mode 100644
index 00000000..e36796d5
--- /dev/null
+++ b/tests/quantified_expr/gold/test1.out
@@ -0,0 +1,2 @@
+at-least one xml element 'test1/a' contains an xml element 'e1'
+all the xml elements 'test2/a' contain an xml element 'e1'
\ No newline at end of file
diff --git a/tests/quantified_expr/gold/test2.out \
b/tests/quantified_expr/gold/test2.out new file mode 100644
index 00000000..5035653d
--- /dev/null
+++ b/tests/quantified_expr/gold/test2.out
@@ -0,0 +1 @@
+at-least one xml element '(test1 | test2)/a' contains an xml element 'e1'
\ No newline at end of file
diff --git a/tests/quantified_expr/gold/test3.out \
b/tests/quantified_expr/gold/test3.out new file mode 100644
index 00000000..2cab5fa1
--- /dev/null
+++ b/tests/quantified_expr/gold/test3.out
@@ -0,0 +1,2 @@
+all the xml elements '(test1 | test2)/a' contain an xml element 'e1'
+all the xml elements '(test1 | test2)/a' contain an xml element 'e1'
\ No newline at end of file
diff --git a/tests/quantified_expr/gold/test4.out \
b/tests/quantified_expr/gold/test4.out new file mode 100644
index 00000000..3177e75e
--- /dev/null
+++ b/tests/quantified_expr/gold/test4.out
@@ -0,0 +1 @@
+all the xml elements '(test1 | test2)/a' contain an xml element 'e1'
\ No newline at end of file
diff --git a/tests/quantified_expr/gold/test5.out \
b/tests/quantified_expr/gold/test5.out new file mode 100644
index 00000000..319e7cfd
--- /dev/null
+++ b/tests/quantified_expr/gold/test5.out
@@ -0,0 +1,2 @@
+check 1 : all the xml elements '(test1 | test2)/a' contain an xml element 'e1'
+check 2 : all the xml elements '(test1 | test2)/a' contain an xml element 'e1'
\ No newline at end of file
diff --git a/tests/quantified_expr/test1.xsl b/tests/quantified_expr/test1.xsl
new file mode 100644
index 00000000..72edabe2
--- /dev/null
+++ b/tests/quantified_expr/test1.xsl
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="3.0">
+                
+   <!-- Author: mukulg@apache.org -->
+   
+   <!-- use with test1_a.xml -->
+   
+   <!-- this XSLT stylesheet does the work, what XPath 3.1 quantified expressions 
+        (i.e, as per the following XPath 3.1 grammar fragment. these XPath \
expressions  +        evaluate to a boolean result) could do.
+   
+        QuantifiedExpr ::= ("some" | "every") "$" VarName "in" ExprSingle ("," "$" 
+                                        VarName "in" ExprSingle)* "satisfies" \
ExprSingle +   -->
+
+   <xsl:output method="text"/>
+
+   <xsl:template match="/elem">      
+      <xsl:variable name="result1">
+         <xsl:for-each select="test1/a">
+           <xsl:if test="e1">
+             <yes/>
+           </xsl:if>
+         </xsl:for-each>
+      </xsl:variable>
+      
+      <xsl:if test="count($result1/yes) &gt; 0">
+         <xsl:text>at-least one xml element 'test1/a' contains an xml element \
'e1'</xsl:text><xsl:text>&#xa;</xsl:text> +      </xsl:if>
+      
+      <xsl:variable name="result2">
+         <xsl:for-each select="test2/a">
+           <xsl:if test="e1">
+             <yes/>
+           </xsl:if>
+         </xsl:for-each>
+       </xsl:variable>
+            
+       <xsl:if test="count($result2/yes) = count(test2/a)">
+          <xsl:text>all the xml elements 'test2/a' contain an xml element \
'e1'</xsl:text> +       </xsl:if>
+   </xsl:template>
+   
+   <!--
+      * Licensed to the Apache Software Foundation (ASF) under one
+      * or more contributor license agreements. See the NOTICE file
+      * distributed with this work for additional information
+      * regarding copyright ownership. The ASF licenses this file
+      * to you under the Apache License, Version 2.0 (the  "License");
+      * you may not use this file except in compliance with the License.
+      * You may obtain a copy of the License at
+      *
+      *     http://www.apache.org/licenses/LICENSE-2.0
+      *
+      * Unless required by applicable law or agreed to in writing, software
+      * distributed under the License is distributed on an "AS IS" BASIS,
+      * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+      * See the License for the specific language governing permissions and
+      * limitations under the License.
+   -->
+
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/quantified_expr/test1_a.xml b/tests/quantified_expr/test1_a.xml
new file mode 100644
index 00000000..0374cf11
--- /dev/null
+++ b/tests/quantified_expr/test1_a.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<elem>
+  <test1>
+    <a/>
+    <a/>
+    <a/>
+    <a>
+      <e1/>
+    </a>
+    <a/>
+  </test1>
+  <test2>
+    <a>
+      <e1/>
+    </a>
+    <a>
+      <e1/> 
+    </a>
+    <a>
+      <e1/> 
+    </a>
+    <a>
+      <e1/>
+    </a>
+    <a>
+      <e1/>
+    </a>
+  </test2>
+</elem>
\ No newline at end of file
diff --git a/tests/quantified_expr/test1_b.xml b/tests/quantified_expr/test1_b.xml
new file mode 100644
index 00000000..910d3674
--- /dev/null
+++ b/tests/quantified_expr/test1_b.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<elem>
+  <test1>
+    <a/>
+    <a/>
+    <a/>
+    <a/>
+    <a/>
+  </test1>
+  <test2>
+    <a/>
+    <a/>
+    <a/>
+    <a>
+      <e1/>
+    </a>
+    <a/>
+  </test2>
+</elem>
\ No newline at end of file
diff --git a/tests/quantified_expr/test1_c.xml b/tests/quantified_expr/test1_c.xml
new file mode 100644
index 00000000..591d12fa
--- /dev/null
+++ b/tests/quantified_expr/test1_c.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<elem>
+  <test1>
+    <a>
+      <e1/>
+    </a>
+    <a>
+      <e1/>
+    </a>
+    <a>
+      <e1/>
+    </a>
+    <a>
+      <e1/>
+    </a>
+    <a>
+      <e1/>
+    </a>
+  </test1>
+  <test2>
+    <a>
+      <e1/>
+    </a>
+    <a>
+      <e1/>
+    </a>
+    <a>
+      <e1/>
+    </a>
+    <a>
+      <e1/>
+    </a>
+    <a>
+      <e1/>
+    </a>
+  </test2>
+</elem>
\ No newline at end of file
diff --git a/tests/quantified_expr/test2.xsl b/tests/quantified_expr/test2.xsl
new file mode 100644
index 00000000..dfff9bbb
--- /dev/null
+++ b/tests/quantified_expr/test2.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="3.0">
+                
+   <!-- Author: mukulg@apache.org -->
+   
+   <!-- use with test1_b.xml -->
+   
+   <!-- this XSLT stylesheet does the work, what XPath 3.1 quantified expressions 
+        (i.e, as per the following XPath 3.1 grammar fragment. these XPath \
expressions  +        evaluate to a boolean result) could do.
+   
+        QuantifiedExpr ::= ("some" | "every") "$" VarName "in" ExprSingle ("," "$" 
+                                        VarName "in" ExprSingle)* "satisfies" \
ExprSingle +   -->
+
+   <xsl:output method="text"/>
+
+   <xsl:template match="/elem">      
+      <xsl:variable name="result">
+         <xsl:for-each select="(test1 | test2)/a">
+           <xsl:if test="e1">
+             <yes/>
+           </xsl:if>
+         </xsl:for-each>
+      </xsl:variable>
+      
+      <xsl:if test="count($result/yes) &gt; 0">
+         <xsl:text>at-least one xml element '(test1 | test2)/a' contains an xml \
element 'e1'</xsl:text> +      </xsl:if>
+   </xsl:template>
+   
+   <!--
+      * Licensed to the Apache Software Foundation (ASF) under one
+      * or more contributor license agreements. See the NOTICE file
+      * distributed with this work for additional information
+      * regarding copyright ownership. The ASF licenses this file
+      * to you under the Apache License, Version 2.0 (the  "License");
+      * you may not use this file except in compliance with the License.
+      * You may obtain a copy of the License at
+      *
+      *     http://www.apache.org/licenses/LICENSE-2.0
+      *
+      * Unless required by applicable law or agreed to in writing, software
+      * distributed under the License is distributed on an "AS IS" BASIS,
+      * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+      * See the License for the specific language governing permissions and
+      * limitations under the License.
+   -->
+
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/quantified_expr/test3.xsl b/tests/quantified_expr/test3.xsl
new file mode 100644
index 00000000..484a944e
--- /dev/null
+++ b/tests/quantified_expr/test3.xsl
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="3.0">
+                
+   <!-- Author: mukulg@apache.org -->
+   
+   <!-- use with test1_c.xml -->
+   
+   <!-- this XSLT stylesheet does the work, what XPath 3.1 quantified expressions 
+        (i.e, as per the following XPath 3.1 grammar fragment. these XPath \
expressions  +        evaluate to a boolean result) could do.
+   
+        QuantifiedExpr ::= ("some" | "every") "$" VarName "in" ExprSingle ("," "$" 
+                                        VarName "in" ExprSingle)* "satisfies" \
ExprSingle +   -->
+
+   <xsl:output method="text"/>
+
+   <xsl:template match="/elem">      
+      <xsl:variable name="result">
+         <xsl:for-each select="(test1 | test2)/a">
+           <xsl:if test="e1">
+             <yes/>
+           </xsl:if>
+         </xsl:for-each>
+      </xsl:variable>
+      
+      <xsl:if test="count($result/yes) = count((test1 | test2)/a)">
+         <xsl:text>all the xml elements '(test1 | test2)/a' contain an xml element \
'e1'</xsl:text><xsl:text>&#xa;</xsl:text> +      </xsl:if>
+      
+      <!-- in-fact, we don't necessarily need to use xsl:variable to do this work. \
the  +           following XPath expression, works fine as well. -->  
+      <xsl:if test="count((test1 | test2)/a) = count((test1 | test2)/a[e1])">
+         <xsl:text>all the xml elements '(test1 | test2)/a' contain an xml element \
'e1'</xsl:text> +      </xsl:if>
+   </xsl:template>
+   
+   <!--
+      * Licensed to the Apache Software Foundation (ASF) under one
+      * or more contributor license agreements. See the NOTICE file
+      * distributed with this work for additional information
+      * regarding copyright ownership. The ASF licenses this file
+      * to you under the Apache License, Version 2.0 (the  "License");
+      * you may not use this file except in compliance with the License.
+      * You may obtain a copy of the License at
+      *
+      *     http://www.apache.org/licenses/LICENSE-2.0
+      *
+      * Unless required by applicable law or agreed to in writing, software
+      * distributed under the License is distributed on an "AS IS" BASIS,
+      * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+      * See the License for the specific language governing permissions and
+      * limitations under the License.
+   -->
+
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/quantified_expr/test4.xsl b/tests/quantified_expr/test4.xsl
new file mode 100644
index 00000000..9dbf97ed
--- /dev/null
+++ b/tests/quantified_expr/test4.xsl
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="3.0">
+                
+   <!-- Author: mukulg@apache.org -->
+   
+   <!-- use with test1_c.xml -->
+   
+   <!-- this XSLT stylesheet does the work, what XPath 3.1 quantified expressions 
+        (i.e, as per the following XPath 3.1 grammar fragment. these XPath \
expressions  +        evaluate to a boolean result) could do.
+   
+        QuantifiedExpr ::= ("some" | "every") "$" VarName "in" ExprSingle ("," "$" 
+                                        VarName "in" ExprSingle)* "satisfies" \
ExprSingle +   -->
+
+   <xsl:output method="text"/>
+
+   <xsl:template match="/elem">      
+      <xsl:variable name="result">
+         <xsl:call-template name="isXmlElementE1eXistsWithinAllElementsA"/>
+      </xsl:variable>
+      
+      <xsl:if test="$result">
+         <xsl:text>all the xml elements '(test1 | test2)/a' contain an xml element \
'e1'</xsl:text> +      </xsl:if>
+   </xsl:template>
+   
+   <xsl:template name="isXmlElementE1eXistsWithinAllElementsA">
+      <xsl:value-of select="count((test1 | test2)/a) = count((test1 | \
test2)/a[e1])"/> +   </xsl:template>
+   
+   <!--
+      * Licensed to the Apache Software Foundation (ASF) under one
+      * or more contributor license agreements. See the NOTICE file
+      * distributed with this work for additional information
+      * regarding copyright ownership. The ASF licenses this file
+      * to you under the Apache License, Version 2.0 (the  "License");
+      * you may not use this file except in compliance with the License.
+      * You may obtain a copy of the License at
+      *
+      *     http://www.apache.org/licenses/LICENSE-2.0
+      *
+      * Unless required by applicable law or agreed to in writing, software
+      * distributed under the License is distributed on an "AS IS" BASIS,
+      * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+      * See the License for the specific language governing permissions and
+      * limitations under the License.
+   -->
+
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/tests/quantified_expr/test5.xsl b/tests/quantified_expr/test5.xsl
new file mode 100644
index 00000000..6cf0eb1b
--- /dev/null
+++ b/tests/quantified_expr/test5.xsl
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="3.0">
+                
+   <!-- Author: mukulg@apache.org -->
+   
+   <!-- use with test1_c.xml -->
+   
+   <!-- This XSLT stylesheet does the work, what XPath 3.1 quantified expressions 
+        (i.e, as per the following XPath 3.1 grammar fragment. these XPath \
expressions  +        evaluate to a boolean result) could do.
+   
+        QuantifiedExpr ::= ("some" | "every") "$" VarName "in" ExprSingle ("," "$" 
+                                        VarName "in" ExprSingle)* "satisfies" \
ExprSingle +                                        
+        This stylesheet example, illustrates the ability of XSLT named template 
+        ("isXmlElementE1eXistsWithinAllElementsA" within this example) to function \
as a  +        re-usable fragment of XSLT code.
+   -->
+
+   <xsl:output method="text"/>
+
+   <xsl:template match="/elem">      
+      <xsl:variable name="result1">
+         <xsl:call-template name="isXmlElementE1eXistsWithinAllElementsA"/>
+      </xsl:variable>
+      
+      <xsl:if test="$result1">
+         <xsl:text>check 1 : all the xml elements '(test1 | test2)/a' contain an xml \
element 'e1'</xsl:text> +      </xsl:if>
+      
+      <xsl:text>&#xa;</xsl:text>
+      
+      <xsl:variable name="result2">
+         <xsl:call-template name="isXmlElementE1eXistsWithinAllElementsA"/>
+      </xsl:variable>
+            
+      <xsl:if test="$result2">
+         <xsl:text>check 2 : all the xml elements '(test1 | test2)/a' contain an xml \
element 'e1'</xsl:text> +      </xsl:if>
+   </xsl:template>
+   
+   <!-- an XSLT named template -->
+   <xsl:template name="isXmlElementE1eXistsWithinAllElementsA">
+      <xsl:value-of select="count((test1 | test2)/a) = count((test1 | \
test2)/a[e1])"/> +   </xsl:template>
+   
+   <!--
+      * Licensed to the Apache Software Foundation (ASF) under one
+      * or more contributor license agreements. See the NOTICE file
+      * distributed with this work for additional information
+      * regarding copyright ownership. The ASF licenses this file
+      * to you under the Apache License, Version 2.0 (the  "License");
+      * you may not use this file except in compliance with the License.
+      * You may obtain a copy of the License at
+      *
+      *     http://www.apache.org/licenses/LICENSE-2.0
+      *
+      * Unless required by applicable law or agreed to in writing, software
+      * distributed under the License is distributed on an "AS IS" BASIS,
+      * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+      * See the License for the specific language governing permissions and
+      * limitations under the License.
+   -->
+
+</xsl:stylesheet>
\ 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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic