scxml 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +0 -0
- data/lib/scxml.rb +86 -0
- data/lib/scxml/document.rb +165 -0
- data/lib/scxml/element.rb +219 -0
- data/lib/scxml/xpath.rb +142 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/predicate/predicate01.out +2 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/predicate/predicate02.out +2 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/predicate/predicate03.out +2 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/predicate/predicate04.out +2 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/predicate/predicate12.out +4 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/predicate/predicate13.out +2 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/predicate/predicate41.out +2 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/predicate/predicate42.out +2 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/predicate/predicate45.out +2 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/predicate/predicate51.out +2 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/predicate/predicate52.out +2 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/predicate/predicate56.out +2 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/predicate/predicate57.out +5 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/predicate/predicate58.out +11 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select01.out +2 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select02.out +4 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select03.out +2 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select04.out +14 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select12.out +2 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select13.out +13 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select41.out +5 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select42.out +5 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select45.out +5 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select51.out +5 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select52.out +3 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select56.out +7 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select57.out +7 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select58.out +5 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select60.out +5 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select62.out +2 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select63.out +2 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select76.out +2 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select81.out +10 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select82.out +2 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select83.out +7 -0
- data/test/scxml/Xalan_Conformance_Tests/REF_OUT/select/select84.out +8 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate01.txt +8 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate01.xml +7 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate01.xsl +18 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate02.txt +8 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate02.xml +7 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate02.xsl +18 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate04.txt +8 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate04.xml +7 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate04.xsl +18 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate07.txt +9 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate07.xml +7 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate07.xsl +20 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate08.txt +9 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate08.xml +7 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate08.xsl +20 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate10.txt +8 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate10.xml +7 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate10.xsl +20 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate14.txt +9 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate14.xml +9 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate14.xsl +20 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate15.txt +9 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate15.xml +9 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate15.xsl +20 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate16.txt +9 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate16.xml +9 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate16.xsl +20 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate17.txt +9 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate17.xml +11 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate17.xsl +20 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate36.txt +8 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate36.xml +7 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate36.xsl +20 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate48.txt +8 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate48.xml +21 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate48.xsl +22 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate49.txt +8 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate49.xml +21 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate49.xsl +22 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate50.txt +8 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate50.xml +21 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate50.xsl +22 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate51.txt +8 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate51.xml +21 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate51.xsl +22 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate52.txt +8 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate52.xml +21 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate52.xsl +22 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate53.txt +8 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate53.xml +21 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate53.xsl +22 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate54.txt +7 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate54.xml +21 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate54.xsl +21 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate55.txt +8 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate55.xml +21 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate55.xsl +22 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate56.txt +8 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate56.xml +21 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/predicate56.xsl +22 -0
- data/test/scxml/Xalan_Conformance_Tests/predicate/prepare.rb +34 -0
- data/test/scxml/Xalan_Conformance_Tests/select/prepare.rb +34 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select01.txt +7 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select01.xml +9 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select01.xsl +19 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select02.txt +7 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select02.xml +4 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select02.xsl +17 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select03.txt +8 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select03.xml +13 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select03.xsl +19 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select04.txt +12 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select04.xml +12 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select04.xsl +35 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select12.txt +7 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select12.xml +9 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select12.xsl +19 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select13.txt +13 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select13.xml +18 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select13.xsl +33 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select41.txt +7 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select41.xml +9 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select41.xsl +23 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select42.txt +8 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select42.xml +9 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select42.xsl +26 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select45.txt +7 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select45.xml +24 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select45.xsl +25 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select51.txt +7 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select51.xml +24 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select51.xsl +25 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select52.txt +6 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select52.xml +6 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select52.xsl +23 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select56.txt +7 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select56.xml +29 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select56.xsl +25 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select57.txt +7 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select57.xml +29 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select57.xsl +25 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select58.txt +7 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select58.xml +17 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select58.xsl +25 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select60.txt +6 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select60.xml +9 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select60.xsl +25 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select62.txt +6 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select62.xml +5 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select62.xsl +22 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select63.txt +7 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select63.xml +10 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select63.xsl +19 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select76.txt +7 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select76.xml +6 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select76.xsl +17 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select81.txt +9 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select81.xml +6 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select81.xsl +24 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select82.txt +9 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select82.xml +5 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select82.xsl +28 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select83.txt +10 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select83.xml +10 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select83.xsl +32 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select84.txt +11 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select84.xml +10 -0
- data/test/scxml/Xalan_Conformance_Tests/select/select84.xsl +33 -0
- data/test/scxml/document_test.rb +231 -0
- data/test/scxml/element_test.rb +552 -0
- data/test/scxml_test_helper.rb +73 -0
- data/test/scxml_test_suite.rb +2 -0
- metadata +241 -0
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<xsl:stylesheet version="1.0"
|
3
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
4
|
+
<!-- FileName: predicate49 -->
|
5
|
+
<!-- Document: http://www.w3.org/TR/xpath -->
|
6
|
+
<!-- DocVersion: 19991116 -->
|
7
|
+
<!-- Section: 3.4 -->
|
8
|
+
<!-- Purpose: Test ((a or b) and c) combination of logical expressions in a predicate -->
|
9
|
+
<!-- Author: Morten Jorgensen -->
|
10
|
+
|
11
|
+
<xsl:template match="foo">
|
12
|
+
<out>
|
13
|
+
<test-info>((a or b) and c)</test-info>
|
14
|
+
<test-output>
|
15
|
+
<xsl:for-each select="bar[(@a='1' or @b='1') and @c='1']">
|
16
|
+
<xsl:value-of select="@seq"/><xsl:text> </xsl:text>
|
17
|
+
</xsl:for-each>
|
18
|
+
</test-output>
|
19
|
+
</out>
|
20
|
+
</xsl:template>
|
21
|
+
|
22
|
+
</xsl:stylesheet>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# FileName: predicate50
|
2
|
+
# Document: http://www.w3.org/TR/xpath
|
3
|
+
# DocVersion: 19991116
|
4
|
+
# Section: 3.4
|
5
|
+
# Purpose: Test (a and (b or c) and d) combination of logical expressions in a predicate
|
6
|
+
# Author: Morten Jorgensen
|
7
|
+
bar[@a='1' and (@b='1' or @c='1') and @d='1']
|
8
|
+
@seq
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<foo>
|
3
|
+
|
4
|
+
<bar a="0" b="0" c="0" d="0" seq="0"/>
|
5
|
+
<bar a="0" b="0" c="0" d="1" seq="1"/>
|
6
|
+
<bar a="0" b="0" c="1" d="0" seq="2"/>
|
7
|
+
<bar a="0" b="0" c="1" d="1" seq="3"/>
|
8
|
+
<bar a="0" b="1" c="0" d="0" seq="4"/>
|
9
|
+
<bar a="0" b="1" c="0" d="1" seq="5"/>
|
10
|
+
<bar a="0" b="1" c="1" d="0" seq="6"/>
|
11
|
+
<bar a="0" b="1" c="1" d="1" seq="7"/>
|
12
|
+
<bar a="1" b="0" c="0" d="0" seq="8"/>
|
13
|
+
<bar a="1" b="0" c="0" d="1" seq="9"/>
|
14
|
+
<bar a="1" b="0" c="1" d="0" seq="a"/>
|
15
|
+
<bar a="1" b="0" c="1" d="1" seq="b"/>
|
16
|
+
<bar a="1" b="1" c="0" d="0" seq="c"/>
|
17
|
+
<bar a="1" b="1" c="0" d="1" seq="d"/>
|
18
|
+
<bar a="1" b="1" c="1" d="0" seq="e"/>
|
19
|
+
<bar a="1" b="1" c="1" d="1" seq="f"/>
|
20
|
+
|
21
|
+
</foo>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<xsl:stylesheet version="1.0"
|
3
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
4
|
+
<!-- FileName: predicate50 -->
|
5
|
+
<!-- Document: http://www.w3.org/TR/xpath -->
|
6
|
+
<!-- DocVersion: 19991116 -->
|
7
|
+
<!-- Section: 3.4 -->
|
8
|
+
<!-- Purpose: Test (a and (b or c) and d) combination of logical expressions in a predicate -->
|
9
|
+
<!-- Author: Morten Jorgensen -->
|
10
|
+
|
11
|
+
<xsl:template match="foo">
|
12
|
+
<out>
|
13
|
+
<test-info>(a and (b or c) and d)</test-info>
|
14
|
+
<test-output>
|
15
|
+
<xsl:for-each select="bar[@a='1' and (@b='1' or @c='1') and @d='1']">
|
16
|
+
<xsl:value-of select="@seq"/><xsl:text> </xsl:text>
|
17
|
+
</xsl:for-each>
|
18
|
+
</test-output>
|
19
|
+
</out>
|
20
|
+
</xsl:template>
|
21
|
+
|
22
|
+
</xsl:stylesheet>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# FileName: predicate51
|
2
|
+
# Document: http://www.w3.org/TR/xpath
|
3
|
+
# DocVersion: 19991116
|
4
|
+
# Section: 3.4
|
5
|
+
# Purpose: Test (a and b or c and d) combination of logical expressions in a predicate
|
6
|
+
# Author: Morten Jorgensen
|
7
|
+
bar[@a='1' and @b='1' or @c='1' and @d='1']
|
8
|
+
@seq
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<foo>
|
3
|
+
|
4
|
+
<bar a="0" b="0" c="0" d="0" seq="0"/>
|
5
|
+
<bar a="0" b="0" c="0" d="1" seq="1"/>
|
6
|
+
<bar a="0" b="0" c="1" d="0" seq="2"/>
|
7
|
+
<bar a="0" b="0" c="1" d="1" seq="3"/>
|
8
|
+
<bar a="0" b="1" c="0" d="0" seq="4"/>
|
9
|
+
<bar a="0" b="1" c="0" d="1" seq="5"/>
|
10
|
+
<bar a="0" b="1" c="1" d="0" seq="6"/>
|
11
|
+
<bar a="0" b="1" c="1" d="1" seq="7"/>
|
12
|
+
<bar a="1" b="0" c="0" d="0" seq="8"/>
|
13
|
+
<bar a="1" b="0" c="0" d="1" seq="9"/>
|
14
|
+
<bar a="1" b="0" c="1" d="0" seq="a"/>
|
15
|
+
<bar a="1" b="0" c="1" d="1" seq="b"/>
|
16
|
+
<bar a="1" b="1" c="0" d="0" seq="c"/>
|
17
|
+
<bar a="1" b="1" c="0" d="1" seq="d"/>
|
18
|
+
<bar a="1" b="1" c="1" d="0" seq="e"/>
|
19
|
+
<bar a="1" b="1" c="1" d="1" seq="f"/>
|
20
|
+
|
21
|
+
</foo>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<xsl:stylesheet version="1.0"
|
3
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
4
|
+
<!-- FileName: predicate51 -->
|
5
|
+
<!-- Document: http://www.w3.org/TR/xpath -->
|
6
|
+
<!-- DocVersion: 19991116 -->
|
7
|
+
<!-- Section: 3.4 -->
|
8
|
+
<!-- Purpose: Test (a and b or c and d) combination of logical expressions in a predicate -->
|
9
|
+
<!-- Author: Morten Jorgensen -->
|
10
|
+
|
11
|
+
<xsl:template match="foo">
|
12
|
+
<out>
|
13
|
+
<test-info>(a and b or c and d)</test-info>
|
14
|
+
<test-output>
|
15
|
+
<xsl:for-each select="bar[@a='1' and @b='1' or @c='1' and @d='1']">
|
16
|
+
<xsl:value-of select="@seq"/><xsl:text> </xsl:text>
|
17
|
+
</xsl:for-each>
|
18
|
+
</test-output>
|
19
|
+
</out>
|
20
|
+
</xsl:template>
|
21
|
+
|
22
|
+
</xsl:stylesheet>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# FileName: predicate52
|
2
|
+
# Document: http://www.w3.org/TR/xpath
|
3
|
+
# DocVersion: 19991116
|
4
|
+
# Section: 3.4
|
5
|
+
# Purpose: Test ((a and b) or (c and d)) combination of logical expressions in a predicate
|
6
|
+
# Author: Morten Jorgensen
|
7
|
+
bar[(@a='1' and @b='1') or (@c='1' and @d='1')]
|
8
|
+
@seq
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<foo>
|
3
|
+
|
4
|
+
<bar a="0" b="0" c="0" d="0" seq="0"/>
|
5
|
+
<bar a="0" b="0" c="0" d="1" seq="1"/>
|
6
|
+
<bar a="0" b="0" c="1" d="0" seq="2"/>
|
7
|
+
<bar a="0" b="0" c="1" d="1" seq="3"/>
|
8
|
+
<bar a="0" b="1" c="0" d="0" seq="4"/>
|
9
|
+
<bar a="0" b="1" c="0" d="1" seq="5"/>
|
10
|
+
<bar a="0" b="1" c="1" d="0" seq="6"/>
|
11
|
+
<bar a="0" b="1" c="1" d="1" seq="7"/>
|
12
|
+
<bar a="1" b="0" c="0" d="0" seq="8"/>
|
13
|
+
<bar a="1" b="0" c="0" d="1" seq="9"/>
|
14
|
+
<bar a="1" b="0" c="1" d="0" seq="a"/>
|
15
|
+
<bar a="1" b="0" c="1" d="1" seq="b"/>
|
16
|
+
<bar a="1" b="1" c="0" d="0" seq="c"/>
|
17
|
+
<bar a="1" b="1" c="0" d="1" seq="d"/>
|
18
|
+
<bar a="1" b="1" c="1" d="0" seq="e"/>
|
19
|
+
<bar a="1" b="1" c="1" d="1" seq="f"/>
|
20
|
+
|
21
|
+
</foo>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<xsl:stylesheet version="1.0"
|
3
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
4
|
+
<!-- FileName: predicate52 -->
|
5
|
+
<!-- Document: http://www.w3.org/TR/xpath -->
|
6
|
+
<!-- DocVersion: 19991116 -->
|
7
|
+
<!-- Section: 3.4 -->
|
8
|
+
<!-- Purpose: Test ((a and b) or (c and d)) combination of logical expressions in a predicate -->
|
9
|
+
<!-- Author: Morten Jorgensen -->
|
10
|
+
|
11
|
+
<xsl:template match="foo">
|
12
|
+
<out>
|
13
|
+
<test-info>((a and b) or (c and d))</test-info>
|
14
|
+
<test-output>
|
15
|
+
<xsl:for-each select="bar[(@a='1' and @b='1') or (@c='1' and @d='1')]">
|
16
|
+
<xsl:value-of select="@seq"/><xsl:text> </xsl:text>
|
17
|
+
</xsl:for-each>
|
18
|
+
</test-output>
|
19
|
+
</out>
|
20
|
+
</xsl:template>
|
21
|
+
|
22
|
+
</xsl:stylesheet>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# FileName: predicate53
|
2
|
+
# Document: http://www.w3.org/TR/xpath
|
3
|
+
# DocVersion: 19991116
|
4
|
+
# Section: 3.4
|
5
|
+
# Purpose: Test (a or (b and c) or d) combination of logical expressions in a predicate
|
6
|
+
# Author: Morten Jorgensen
|
7
|
+
bar[@a='1' or (@b='1' and @c='1') or @d='1']
|
8
|
+
@seq
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<foo>
|
3
|
+
|
4
|
+
<bar a="0" b="0" c="0" d="0" seq="0"/>
|
5
|
+
<bar a="0" b="0" c="0" d="1" seq="1"/>
|
6
|
+
<bar a="0" b="0" c="1" d="0" seq="2"/>
|
7
|
+
<bar a="0" b="0" c="1" d="1" seq="3"/>
|
8
|
+
<bar a="0" b="1" c="0" d="0" seq="4"/>
|
9
|
+
<bar a="0" b="1" c="0" d="1" seq="5"/>
|
10
|
+
<bar a="0" b="1" c="1" d="0" seq="6"/>
|
11
|
+
<bar a="0" b="1" c="1" d="1" seq="7"/>
|
12
|
+
<bar a="1" b="0" c="0" d="0" seq="8"/>
|
13
|
+
<bar a="1" b="0" c="0" d="1" seq="9"/>
|
14
|
+
<bar a="1" b="0" c="1" d="0" seq="a"/>
|
15
|
+
<bar a="1" b="0" c="1" d="1" seq="b"/>
|
16
|
+
<bar a="1" b="1" c="0" d="0" seq="c"/>
|
17
|
+
<bar a="1" b="1" c="0" d="1" seq="d"/>
|
18
|
+
<bar a="1" b="1" c="1" d="0" seq="e"/>
|
19
|
+
<bar a="1" b="1" c="1" d="1" seq="f"/>
|
20
|
+
|
21
|
+
</foo>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<xsl:stylesheet version="1.0"
|
3
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
4
|
+
<!-- FileName: predicate53 -->
|
5
|
+
<!-- Document: http://www.w3.org/TR/xpath -->
|
6
|
+
<!-- DocVersion: 19991116 -->
|
7
|
+
<!-- Section: 3.4 -->
|
8
|
+
<!-- Purpose: Test (a or (b and c) or d) combination of logical expressions in a predicate-->
|
9
|
+
<!-- Author: Morten Jorgensen -->
|
10
|
+
|
11
|
+
<xsl:template match="foo">
|
12
|
+
<out>
|
13
|
+
<test-info>(a or (b and c) or d)</test-info>
|
14
|
+
<test-output>
|
15
|
+
<xsl:for-each select="bar[@a='1' or (@b='1' and @c='1') or @d='1']">
|
16
|
+
<xsl:value-of select="@seq"/><xsl:text> </xsl:text>
|
17
|
+
</xsl:for-each>
|
18
|
+
</test-output>
|
19
|
+
</out>
|
20
|
+
</xsl:template>
|
21
|
+
|
22
|
+
</xsl:stylesheet>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<foo>
|
3
|
+
|
4
|
+
<bar a="0" b="0" c="0" d="0" seq="0"/>
|
5
|
+
<bar a="0" b="0" c="0" d="1" seq="1"/>
|
6
|
+
<bar a="0" b="0" c="1" d="0" seq="2"/>
|
7
|
+
<bar a="0" b="0" c="1" d="1" seq="3"/>
|
8
|
+
<bar a="0" b="1" c="0" d="0" seq="4"/>
|
9
|
+
<bar a="0" b="1" c="0" d="1" seq="5"/>
|
10
|
+
<bar a="0" b="1" c="1" d="0" seq="6"/>
|
11
|
+
<bar a="0" b="1" c="1" d="1" seq="7"/>
|
12
|
+
<bar a="1" b="0" c="0" d="0" seq="8"/>
|
13
|
+
<bar a="1" b="0" c="0" d="1" seq="9"/>
|
14
|
+
<bar a="1" b="0" c="1" d="0" seq="a"/>
|
15
|
+
<bar a="1" b="0" c="1" d="1" seq="b"/>
|
16
|
+
<bar a="1" b="1" c="0" d="0" seq="c"/>
|
17
|
+
<bar a="1" b="1" c="0" d="1" seq="d"/>
|
18
|
+
<bar a="1" b="1" c="1" d="0" seq="e"/>
|
19
|
+
<bar a="1" b="1" c="1" d="1" seq="f"/>
|
20
|
+
|
21
|
+
</foo>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<xsl:stylesheet version="1.0"
|
3
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
4
|
+
<!-- FileName: predicate54 -->
|
5
|
+
<!-- Document: http://www.w3.org/TR/xpath -->
|
6
|
+
<!-- DocVersion: 19991116 -->
|
7
|
+
<!-- Section: 3.4 -->
|
8
|
+
<!-- Purpose: Test ((a or b) and (c or d)) combination of logical expressions in a predicate-->
|
9
|
+
|
10
|
+
<xsl:template match="foo">
|
11
|
+
<out>
|
12
|
+
<test-info>((a or b) and (c or d))</test-info>
|
13
|
+
<test-output>
|
14
|
+
<xsl:for-each select="bar[(@a='1' or @b='1') and (@c='1' or @d='1')]">
|
15
|
+
<xsl:value-of select="@seq"/><xsl:text> </xsl:text>
|
16
|
+
</xsl:for-each>
|
17
|
+
</test-output>
|
18
|
+
</out>
|
19
|
+
</xsl:template>
|
20
|
+
|
21
|
+
</xsl:stylesheet>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# FileName: predicate55
|
2
|
+
# Document: http://www.w3.org/TR/xpath
|
3
|
+
# DocVersion: 19991116
|
4
|
+
# Section: 3.4
|
5
|
+
# Purpose: Test (a or b and c or d) combination of logical expressions in a predicate
|
6
|
+
# Author: Morten Jorgensen
|
7
|
+
bar[@a='1' or @b='1' and @c='1' or @d='1']
|
8
|
+
@seq
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<foo>
|
3
|
+
|
4
|
+
<bar a="0" b="0" c="0" d="0" seq="0"/>
|
5
|
+
<bar a="0" b="0" c="0" d="1" seq="1"/>
|
6
|
+
<bar a="0" b="0" c="1" d="0" seq="2"/>
|
7
|
+
<bar a="0" b="0" c="1" d="1" seq="3"/>
|
8
|
+
<bar a="0" b="1" c="0" d="0" seq="4"/>
|
9
|
+
<bar a="0" b="1" c="0" d="1" seq="5"/>
|
10
|
+
<bar a="0" b="1" c="1" d="0" seq="6"/>
|
11
|
+
<bar a="0" b="1" c="1" d="1" seq="7"/>
|
12
|
+
<bar a="1" b="0" c="0" d="0" seq="8"/>
|
13
|
+
<bar a="1" b="0" c="0" d="1" seq="9"/>
|
14
|
+
<bar a="1" b="0" c="1" d="0" seq="a"/>
|
15
|
+
<bar a="1" b="0" c="1" d="1" seq="b"/>
|
16
|
+
<bar a="1" b="1" c="0" d="0" seq="c"/>
|
17
|
+
<bar a="1" b="1" c="0" d="1" seq="d"/>
|
18
|
+
<bar a="1" b="1" c="1" d="0" seq="e"/>
|
19
|
+
<bar a="1" b="1" c="1" d="1" seq="f"/>
|
20
|
+
|
21
|
+
</foo>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<xsl:stylesheet version="1.0"
|
3
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
4
|
+
<!-- FileName: predicate55 -->
|
5
|
+
<!-- Document: http://www.w3.org/TR/xpath -->
|
6
|
+
<!-- DocVersion: 19991116 -->
|
7
|
+
<!-- Section: 3.4 -->
|
8
|
+
<!-- Purpose: Test (a or b and c or d) combination of logical expressions in a predicate-->
|
9
|
+
<!-- Author: Morten Jorgensen -->
|
10
|
+
|
11
|
+
<xsl:template match="foo">
|
12
|
+
<out>
|
13
|
+
<test-info>(a or b and c or d)</test-info>
|
14
|
+
<test-output>
|
15
|
+
<xsl:for-each select="bar[@a='1' or @b='1' and @c='1' or @d='1']">
|
16
|
+
<xsl:value-of select="@seq"/><xsl:text> </xsl:text>
|
17
|
+
</xsl:for-each>
|
18
|
+
</test-output>
|
19
|
+
</out>
|
20
|
+
</xsl:template>
|
21
|
+
|
22
|
+
</xsl:stylesheet>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<foo>
|
3
|
+
|
4
|
+
<bar a="0" b="0" c="0" d="0" seq="0"/>
|
5
|
+
<bar a="0" b="0" c="0" d="1" seq="1"/>
|
6
|
+
<bar a="0" b="0" c="1" d="0" seq="2"/>
|
7
|
+
<bar a="0" b="0" c="1" d="1" seq="3"/>
|
8
|
+
<bar a="0" b="1" c="0" d="0" seq="4"/>
|
9
|
+
<bar a="0" b="1" c="0" d="1" seq="5"/>
|
10
|
+
<bar a="0" b="1" c="1" d="0" seq="6"/>
|
11
|
+
<bar a="0" b="1" c="1" d="1" seq="7"/>
|
12
|
+
<bar a="1" b="0" c="0" d="0" seq="8"/>
|
13
|
+
<bar a="1" b="0" c="0" d="1" seq="9"/>
|
14
|
+
<bar a="1" b="0" c="1" d="0" seq="a"/>
|
15
|
+
<bar a="1" b="0" c="1" d="1" seq="b"/>
|
16
|
+
<bar a="1" b="1" c="0" d="0" seq="c"/>
|
17
|
+
<bar a="1" b="1" c="0" d="1" seq="d"/>
|
18
|
+
<bar a="1" b="1" c="1" d="0" seq="e"/>
|
19
|
+
<bar a="1" b="1" c="1" d="1" seq="f"/>
|
20
|
+
|
21
|
+
</foo>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<xsl:stylesheet version="1.0"
|
3
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
4
|
+
<!-- FileName: predicate56 -->
|
5
|
+
<!-- Document: http://www.w3.org/TR/xpath -->
|
6
|
+
<!-- DocVersion: 19991116 -->
|
7
|
+
<!-- Section: 3.4 -->
|
8
|
+
<!-- Purpose: Test (a or b or c) combination of logical expressions in a predicate-->
|
9
|
+
<!-- Author: Morten Jorgensen -->
|
10
|
+
|
11
|
+
<xsl:template match="foo">
|
12
|
+
<out>
|
13
|
+
<test-info>(a or b or c)</test-info>
|
14
|
+
<test-output>
|
15
|
+
<xsl:for-each select="bar[@a='1' or @b='1' or @c='1']">
|
16
|
+
<xsl:value-of select="@seq"/><xsl:text> </xsl:text>
|
17
|
+
</xsl:for-each>
|
18
|
+
</test-output>
|
19
|
+
</out>
|
20
|
+
</xsl:template>
|
21
|
+
|
22
|
+
</xsl:stylesheet>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
dir = File.dirname(__FILE__)
|
3
|
+
|
4
|
+
#keepers = [1, 2, 3, 4, 12, 13, 41, 42, 45, 51, 52, 56, 57, 58, 60, 62, 63, 76, 81, 83, 82, 84]
|
5
|
+
keepers = [1,2,4,7,8,10,16,14,15,17,36,48,49,50,51,52,53,54,55,56]
|
6
|
+
|
7
|
+
Dir.new(dir).each do |file|
|
8
|
+
next unless file =~ /(\d+)/
|
9
|
+
number = $1.to_i
|
10
|
+
|
11
|
+
File.delete(file) unless keepers.include?(number)
|
12
|
+
end
|
13
|
+
|
14
|
+
Dir.new(dir).each do |file|
|
15
|
+
next unless file =~ /(\d+).xsl/
|
16
|
+
|
17
|
+
text = File.readlines(file)
|
18
|
+
text.collect! do |line|
|
19
|
+
if line =~ /<!--/
|
20
|
+
line.gsub(/\s*<!--/, '#').gsub(/-->/, '')
|
21
|
+
elsif line =~ /select="(.*)"/
|
22
|
+
$1 + "\n"
|
23
|
+
else
|
24
|
+
nil
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
text.delete_if {|line| line.nil? }
|
29
|
+
text = text.join('')
|
30
|
+
|
31
|
+
File.open( file.chomp('.xsl') + ".txt", 'w') do |output|
|
32
|
+
output << text
|
33
|
+
end
|
34
|
+
end
|