summaryrefslogtreecommitdiff
path: root/tests/REC
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2001-05-03 16:01:22 +0000
committerDaniel Veillard <veillard@src.gnome.org>2001-05-03 16:01:22 +0000
commitb41da1738f0388a9599b8cf485b8b78d539acfeb (patch)
treefd971fb139f1fe351fdc815d9c154ec31261d582 /tests/REC
parenta99c85235dcc381e6597a8055647d5ecff7cc003 (diff)
downloadlibxslt-b41da1738f0388a9599b8cf485b8b78d539acfeb.tar.gz
libxslt-b41da1738f0388a9599b8cf485b8b78d539acfeb.tar.bz2
libxslt-b41da1738f0388a9599b8cf485b8b78d539acfeb.zip
- xsltutils.[ch] transform.c: implemented multiple levels of
sorting - test/REC/test-10-2.*: added a really small test for it Daniel
Diffstat (limited to 'tests/REC')
-rw-r--r--tests/REC/test-10-2.out2
-rw-r--r--tests/REC/test-10-2.xml20
-rw-r--r--tests/REC/test-10-2.xsl20
3 files changed, 42 insertions, 0 deletions
diff --git a/tests/REC/test-10-2.out b/tests/REC/test-10-2.out
new file mode 100644
index 00000000..2b357065
--- /dev/null
+++ b/tests/REC/test-10-2.out
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<ul><li>Joe Bar</li><li>Daniel Veillard</li><li>Joel Veillard</li></ul>
diff --git a/tests/REC/test-10-2.xml b/tests/REC/test-10-2.xml
new file mode 100644
index 00000000..09c8ee65
--- /dev/null
+++ b/tests/REC/test-10-2.xml
@@ -0,0 +1,20 @@
+<employees>
+ <employee>
+ <name>
+ <given>Joel</given>
+ <family>Veillard</family>
+ </name>
+ </employee>
+ <employee>
+ <name>
+ <given>Daniel</given>
+ <family>Veillard</family>
+ </name>
+ </employee>
+ <employee>
+ <name>
+ <given>Joe</given>
+ <family>Bar</family>
+ </name>
+ </employee>
+</employees>
diff --git a/tests/REC/test-10-2.xsl b/tests/REC/test-10-2.xsl
new file mode 100644
index 00000000..613c4f33
--- /dev/null
+++ b/tests/REC/test-10-2.xsl
@@ -0,0 +1,20 @@
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:template match="employees">
+ <ul>
+ <xsl:apply-templates select="employee">
+ <xsl:sort select="name/family"/>
+ <xsl:sort select="name/given"/>
+ </xsl:apply-templates>
+ </ul>
+</xsl:template>
+
+<xsl:template match="employee">
+ <li>
+ <xsl:value-of select="name/given"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="name/family"/>
+ </li>
+</xsl:template>
+</xsl:stylesheet>