summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWilliam M. Brack <wbrack@src.gnome.org>1997-01-01 03:06:04 +0000
committerWilliam M. Brack <wbrack@src.gnome.org>1997-01-01 03:06:04 +0000
commitc3acc46fcf5e6868aac75129049485686cb56b5d (patch)
treedfabb6d331249bd66619aec1cb70d21cb8ea99bf /tests
downloadlibxslt-c3acc46fcf5e6868aac75129049485686cb56b5d.tar.gz
libxslt-c3acc46fcf5e6868aac75129049485686cb56b5d.tar.bz2
libxslt-c3acc46fcf5e6868aac75129049485686cb56b5d.zip
Added testfiles for bug 114812
Diffstat (limited to 'tests')
-rw-r--r--tests/exslt/common/import-test1.out5
-rw-r--r--tests/exslt/common/import-test1.xml5
-rw-r--r--tests/exslt/common/import-test1.xsl33
-rw-r--r--tests/exslt/common/import-test1a.imp31
-rw-r--r--tests/exslt/common/import-test1b.imp28
5 files changed, 102 insertions, 0 deletions
diff --git a/tests/exslt/common/import-test1.out b/tests/exslt/common/import-test1.out
new file mode 100644
index 00000000..10a564e7
--- /dev/null
+++ b/tests/exslt/common/import-test1.out
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+
+Func f1 at top level
+Func f2 in module 1a
+Func f3 in module 1b
diff --git a/tests/exslt/common/import-test1.xml b/tests/exslt/common/import-test1.xml
new file mode 100644
index 00000000..04e42eae
--- /dev/null
+++ b/tests/exslt/common/import-test1.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+
+<doc>
+
+</doc>
diff --git a/tests/exslt/common/import-test1.xsl b/tests/exslt/common/import-test1.xsl
new file mode 100644
index 00000000..eae27c0c
--- /dev/null
+++ b/tests/exslt/common/import-test1.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<!--
+ Elememtary test for imported exslt stylesheets. This was composed for
+ checking on bug 114812. test-import1.xsl imports test-import1a.imp
+ which in turn imports test-import1b.imp. If successful, f1() should
+ come from this stylesheet, f2() should come from test-import1a.imp,
+ and f3() should come from test-import1b.imp.
+-->
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ xmlns:func="http://exslt.org/functions"
+ extension-element-prefixes="exsl func"
+ exclude-result-prefixes="exsl func my"
+ xmlns:my="my://own.uri"
+>
+
+<xsl:import href="import-test1a.imp"/>
+
+<func:function name="my:f1">
+<func:result>
+Func f1 at top level</func:result>
+</func:function>
+
+<xsl:template match="/">
+ <xsl:value-of select="my:f1()"/>
+ <xsl:value-of select="my:f2()"/>
+ <xsl:value-of select="my:f3()"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/exslt/common/import-test1a.imp b/tests/exslt/common/import-test1a.imp
new file mode 100644
index 00000000..28e4db8e
--- /dev/null
+++ b/tests/exslt/common/import-test1a.imp
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ xmlns:func="http://exslt.org/functions"
+ extension-element-prefixes="exsl func"
+ exclude-result-prefixes="exsl func my"
+ xmlns:my="my://own.uri"
+>
+
+<xsl:import href="import-test1b.imp"/>
+
+<func:function name="my:f1">
+<func:result>
+Func f1 in module 1a</func:result>
+</func:function>
+
+<func:function name="my:f2">
+<func:result>
+Func f2 in module 1a</func:result>
+</func:function>
+
+<xsl:template match="/">
+ <xsl:copy-of select="my:f1()"/>
+ <xsl:copy-of select="my:f2()"/>
+ <xsl:copy-of select="my:f3()"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/exslt/common/import-test1b.imp b/tests/exslt/common/import-test1b.imp
new file mode 100644
index 00000000..c3ddf31b
--- /dev/null
+++ b/tests/exslt/common/import-test1b.imp
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ xmlns:func="http://exslt.org/functions"
+ extension-element-prefixes="exsl func"
+ exclude-result-prefixes="exsl func my"
+ xmlns:my="my://own.uri"
+>
+
+<func:function name="my:f2">
+<func:result>
+Func f2 in module 1b</func:result>
+</func:function>
+
+<func:function name="my:f3">
+<func:result>
+Func f3 in module 1b</func:result>
+</func:function>
+
+<xsl:template match="/">
+ <xsl:copy-of select="my:f2()"/>
+ <xsl:copy-of select="my:f3()"/>
+</xsl:template>
+
+</xsl:stylesheet>