Added testfiles for bug 114812
authorWilliam M. Brack <wbrack@src.gnome.org>
Wed, 1 Jan 1997 03:06:04 +0000 (03:06 +0000)
committerWilliam M. Brack <wbrack@src.gnome.org>
Wed, 1 Jan 1997 03:06:04 +0000 (03:06 +0000)
tests/exslt/common/import-test1.out [new file with mode: 0644]
tests/exslt/common/import-test1.xml [new file with mode: 0644]
tests/exslt/common/import-test1.xsl [new file with mode: 0644]
tests/exslt/common/import-test1a.imp [new file with mode: 0644]
tests/exslt/common/import-test1b.imp [new file with mode: 0644]

diff --git a/tests/exslt/common/import-test1.out b/tests/exslt/common/import-test1.out
new file mode 100644 (file)
index 0000000..10a564e
--- /dev/null
@@ -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 (file)
index 0000000..04e42ea
--- /dev/null
@@ -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 (file)
index 0000000..eae27c0
--- /dev/null
@@ -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 (file)
index 0000000..28e4db8
--- /dev/null
@@ -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 (file)
index 0000000..c3ddf31
--- /dev/null
@@ -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>