summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWilliam M. Brack <wbrack@src.gnome.org>2004-11-25 14:32:45 +0000
committerWilliam M. Brack <wbrack@src.gnome.org>2004-11-25 14:32:45 +0000
commit4ca8cab70f712428f56ade81876ac2c07a3bbcb0 (patch)
tree19dc9d6f28cc25ae532cbe715574374e7c818e28 /tests
parent38c93a398f80f5dde5100299f02c5b0fcb680bb6 (diff)
downloadlibxslt-4ca8cab70f712428f56ade81876ac2c07a3bbcb0.tar.gz
libxslt-4ca8cab70f712428f56ade81876ac2c07a3bbcb0.tar.bz2
libxslt-4ca8cab70f712428f56ade81876ac2c07a3bbcb0.zip
backed out the last change and re-did it the "right way" (bug 158372).
* libxslt/variables.c, libxslt/xsltInternals.h: backed out the last change and re-did it the "right way" (bug 158372). * tests/general/bug-158.*, tests/general/Makefile.am, tests/docs/bug-158.*, tests/general/Makefile.am: added test case for this bug
Diffstat (limited to 'tests')
-rw-r--r--tests/docs/Makefile.am1
-rw-r--r--tests/docs/bug-158.doc3
-rw-r--r--tests/docs/bug-158.xml2
-rw-r--r--tests/general/Makefile.am1
-rw-r--r--tests/general/bug-158.out4
-rw-r--r--tests/general/bug-158.xsl19
6 files changed, 30 insertions, 0 deletions
diff --git a/tests/docs/Makefile.am b/tests/docs/Makefile.am
index cc00c88a..b0a1b08f 100644
--- a/tests/docs/Makefile.am
+++ b/tests/docs/Makefile.am
@@ -157,6 +157,7 @@ EXTRA_DIST = \
bug-155.xml \
bug-156.xml \
bug-157.xml \
+ bug-158.xml bug-158.doc \
character.xml \
array.xml \
items.xml
diff --git a/tests/docs/bug-158.doc b/tests/docs/bug-158.doc
new file mode 100644
index 00000000..80b3f018
--- /dev/null
+++ b/tests/docs/bug-158.doc
@@ -0,0 +1,3 @@
+<site xmlns="http://www.decisionsoft.com/website-layout">
+ <page path="path" />
+</site>
diff --git a/tests/docs/bug-158.xml b/tests/docs/bug-158.xml
new file mode 100644
index 00000000..19837413
--- /dev/null
+++ b/tests/docs/bug-158.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8" ?>
+ <page xmlns="http://www.decisionsoft.com/website" path="path" />
diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am
index 98059cad..25747fbc 100644
--- a/tests/general/Makefile.am
+++ b/tests/general/Makefile.am
@@ -166,6 +166,7 @@ EXTRA_DIST = \
bug-156.err bug-156.out bug-156.xsl \
bug-156.imp1.imp bug-156.imp2.imp \
bug-157.err bug-157.out bug-157.xsl \
+ bug-158.out bug-158.xsl \
character.out character.xsl \
character2.out character2.xsl \
itemschoose.out itemschoose.xsl \
diff --git a/tests/general/bug-158.out b/tests/general/bug-158.out
new file mode 100644
index 00000000..663816ca
--- /dev/null
+++ b/tests/general/bug-158.out
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+
+myPath is path
+root is
diff --git a/tests/general/bug-158.xsl b/tests/general/bug-158.xsl
new file mode 100644
index 00000000..0e77175d
--- /dev/null
+++ b/tests/general/bug-158.xsl
@@ -0,0 +1,19 @@
+<?xml version="1.0" ?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:dsl="http://www.decisionsoft.com/website"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns:layout="http://www.decisionsoft.com/website-layout"
+ xmlns="http://www.w3.org/1999/xhtml">
+
+<xsl:variable name="myPath" select="/dsl:page/@path" />
+<xsl:variable name="layout" select="document('../docs/bug158.doc')"/>
+<xsl:variable name="root"><xsl:value-of select="$layout//layout:page[@path=$myPath]" />
+</xsl:variable>
+
+<xsl:template match="/">
+myPath is <xsl:value-of select="$myPath" />
+root is <xsl:value-of select="$root" />
+</xsl:template>
+
+</xsl:stylesheet>