diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2001-10-06 13:11:36 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2001-10-06 13:11:36 +0000 |
commit | a8c9bceeaff9913664c20fa752fb1c19e3a47132 (patch) | |
tree | 877e22ae9dec6184d58daf2d91f5b1bb1f9700c2 | |
parent | c4024f11bdc4de152e677525a1a41bb96430bda0 (diff) | |
download | libxslt-a8c9bceeaff9913664c20fa752fb1c19e3a47132.tar.gz libxslt-a8c9bceeaff9913664c20fa752fb1c19e3a47132.tar.bz2 libxslt-a8c9bceeaff9913664c20fa752fb1c19e3a47132.zip |
fixing bug #61673 part II added a specific example in the regression tests
* libxslt/variables.c: fixing bug #61673 part II
* tests/docs/Makefile.am tests/docs/bug-65.xml
tests/general/Makefile.am tests/general/bug-65.*: added a
specific example in the regression tests
Daniel
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | libxslt/variables.c | 4 | ||||
-rw-r--r-- | tests/docs/Makefile.am | 1 | ||||
-rw-r--r-- | tests/docs/bug-65.xml | 5 | ||||
-rw-r--r-- | tests/general/Makefile.am | 1 | ||||
-rw-r--r-- | tests/general/bug-65.ent | 7 | ||||
-rw-r--r-- | tests/general/bug-65.out | 8 | ||||
-rw-r--r-- | tests/general/bug-65.xsl | 26 |
8 files changed, 57 insertions, 2 deletions
@@ -1,3 +1,10 @@ +Sat Oct 6 15:10:16 CEST 2001 Daniel Veillard <daniel@veillard.com> + + * libxslt/variables.c: fixing bug #61673 part II + * tests/docs/Makefile.am tests/docs/bug-65.xml + tests/general/Makefile.am tests/general/bug-65.*: added a + specific example in the regression tests + Sat Oct 6 12:41:37 CEST 2001 Daniel Veillard <daniel@veillard.com> * libxslt/pattern.c: fixed bug #61627 diff --git a/libxslt/variables.c b/libxslt/variables.c index 64fadf6b..ffb7b569 100644 --- a/libxslt/variables.c +++ b/libxslt/variables.c @@ -358,7 +358,7 @@ xsltEvalVariable(xsltTransformContextPtr ctxt, xsltStackElemPtr elem, xmlNodePtr container; xmlNodePtr oldInsert; - container = xmlNewDocNode(ctxt->output, NULL, + container = xmlNewDocNode(ctxt->document->doc, NULL, (const xmlChar *) "fake", NULL); if (container == NULL) return(NULL); @@ -478,7 +478,7 @@ xsltEvalGlobalVariable(xsltStackElemPtr elem, xsltTransformContextPtr ctxt) { xmlNodePtr container; xmlNodePtr oldInsert; - container = xmlNewDocNode(ctxt->output, NULL, + container = xmlNewDocNode(ctxt->document->doc, NULL, (const xmlChar *) "fake", NULL); if (container == NULL) return(NULL); diff --git a/tests/docs/Makefile.am b/tests/docs/Makefile.am index 84b82524..3ae6ec19 100644 --- a/tests/docs/Makefile.am +++ b/tests/docs/Makefile.am @@ -66,6 +66,7 @@ EXTRA_DIST = \ bug-62.xml \ bug-63.xml \ bug-64.xml \ + bug-65.xml \ character.xml \ array.xml \ items.xml diff --git a/tests/docs/bug-65.xml b/tests/docs/bug-65.xml new file mode 100644 index 00000000..e2a137c5 --- /dev/null +++ b/tests/docs/bug-65.xml @@ -0,0 +1,5 @@ +<?xml version="1.0"?> +<eins> +<content>content of one</content> +</eins> + diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am index 19451175..a867fa76 100644 --- a/tests/general/Makefile.am +++ b/tests/general/Makefile.am @@ -69,6 +69,7 @@ EXTRA_DIST = \ bug-62.out bug-62.xsl \ bug-63.out bug-63.xsl \ bug-64.out bug-64.xsl \ + bug-65.ent bug-65.out bug-65.xsl \ character.out character.xsl \ character2.out character2.xsl \ itemschoose.out itemschoose.xsl \ diff --git a/tests/general/bug-65.ent b/tests/general/bug-65.ent new file mode 100644 index 00000000..a9d94249 --- /dev/null +++ b/tests/general/bug-65.ent @@ -0,0 +1,7 @@ +<?xml version="1.0"?> +<two> +<content>content of two1</content> +<content>content of two2</content> +<content>content of two3</content> +</two> + diff --git a/tests/general/bug-65.out b/tests/general/bug-65.out new file mode 100644 index 00000000..a76f8efa --- /dev/null +++ b/tests/general/bug-65.out @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<content>content of one</content> +----------------- +<content>content of one</content> +----------------- +<content>content of one</content> +----------------- + diff --git a/tests/general/bug-65.xsl b/tests/general/bug-65.xsl new file mode 100644 index 00000000..9caa31c0 --- /dev/null +++ b/tests/general/bug-65.xsl @@ -0,0 +1,26 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:libxslt="http://xmlsoft.org/XSLT/namespace" xsl:exclude-result-prefixes="libxslt" version="1.0"> + <xsl:output method="xml" indent="yes"/> + <xsl:variable name="one"> + <xsl:copy-of select="."/> + </xsl:variable> + <xsl:variable name="two" select="document('bug-65.ent')"/> + <xsl:template match="/"> + <xsl:apply-templates select="$two" mode="two"/> + </xsl:template> + <xsl:template match="*" mode="two"> + <xsl:for-each select="//content"> + <xsl:apply-templates select="libxslt:node-set($one)" mode="one"/> + <xsl:text> +----------------- +</xsl:text> + </xsl:for-each> + </xsl:template> + <xsl:template match="*" mode="one"> + <xsl:for-each select="//content"> +<!-- here is the problem (.//content works well, but I need the key + function)--> + <xsl:copy-of select="."/> + </xsl:for-each> + </xsl:template> +</xsl:stylesheet> |