mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-12-24 22:20:59 +03:00
forgot to make one change related to Result Value Tree change, pointed out
* libxslt/transform.c: forgot to make one change related to Result Value Tree change, pointed out by Sebastian Rahtz * tests/docs/Makefile.am tests/docs/bug-112.* tests/general/Makefile.am tests/general/bug-112*: added an example in the regression tests that bug Daniel
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
Wed Mar 26 19:08:55 CET 2003 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* libxslt/transform.c: forgot to make one change related to
|
||||
Result Value Tree change, pointed out by Sebastian Rahtz
|
||||
* tests/docs/Makefile.am tests/docs/bug-112.*
|
||||
tests/general/Makefile.am tests/general/bug-112*: added an
|
||||
example in the regression tests that bug
|
||||
|
||||
Wed Mar 26 01:38:38 CET 2003 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* libxslt/transform.c: second part of the patch fixing #108905
|
||||
|
||||
@@ -3419,18 +3419,21 @@ xsltForEach(xsltTransformContextPtr ctxt, xmlNodePtr node,
|
||||
(list->nodeTab[i]->doc->doc)!=ctxt->xpathCtxt->doc) {
|
||||
/* The nodeset is from another document, so must change */
|
||||
ctxt->xpathCtxt->doc=list->nodeTab[i]->doc->doc;
|
||||
if ((ctxt->document =
|
||||
xsltFindDocument(ctxt,list->nodeTab[i]->doc->doc))==NULL) {
|
||||
xsltTransformError(ctxt, NULL, inst,
|
||||
"xsl:for-each : can't find doc\n");
|
||||
goto error;
|
||||
}
|
||||
ctxt->xpathCtxt->node = list->nodeTab[i];
|
||||
if (list->nodeTab[i]->doc->name != NULL) {
|
||||
ctxt->document = xsltFindDocument(ctxt,
|
||||
list->nodeTab[i]->doc->doc);
|
||||
ctxt->xpathCtxt->node = list->nodeTab[i];
|
||||
#ifdef WITH_XSLT_DEBUG_PROCESS
|
||||
xsltGenericDebug(xsltGenericDebugContext,
|
||||
if (ctxt->document != NULL) {
|
||||
xsltGenericDebug(xsltGenericDebugContext,
|
||||
"xsltForEach: Changing document - context doc %s, xpathdoc %s\n",
|
||||
ctxt->document->doc->URL, ctxt->xpathCtxt->doc->URL);
|
||||
ctxt->document->doc->URL, ctxt->xpathCtxt->doc->URL);
|
||||
} else {
|
||||
xsltGenericDebug(xsltGenericDebugContext,
|
||||
"xsltForEach: Changing document - Return tree fragment\n");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
xsltApplyOneTemplate(ctxt, list->nodeTab[i], replacement, NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -111,6 +111,7 @@ EXTRA_DIST = \
|
||||
bug-109.xml \
|
||||
bug-110.xml bug-110.ent \
|
||||
bug-111.xml \
|
||||
bug-112.xml \
|
||||
character.xml \
|
||||
array.xml \
|
||||
items.xml
|
||||
|
||||
1
tests/docs/bug-112.xml
Normal file
1
tests/docs/bug-112.xml
Normal file
@@ -0,0 +1 @@
|
||||
<doc/>
|
||||
@@ -116,6 +116,7 @@ EXTRA_DIST = \
|
||||
bug-109.out bug-109.xsl \
|
||||
bug-110.out bug-110.xsl \
|
||||
bug-111.out bug-111.xsl \
|
||||
bug-112.out bug-112.xsl \
|
||||
character.out character.xsl \
|
||||
character2.out character2.xsl \
|
||||
itemschoose.out itemschoose.xsl \
|
||||
|
||||
2
tests/general/bug-112.out
Normal file
2
tests/general/bug-112.out
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0"?>
|
||||
abcd
|
||||
22
tests/general/bug-112.xsl
Normal file
22
tests/general/bug-112.xsl
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:exsl="http://exslt.org/common"
|
||||
exclude-result-prefixes="exsl"
|
||||
extension-element-prefixes="exsl"
|
||||
version="1.0">
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:variable name="tds">
|
||||
<row>
|
||||
<cell>a</cell>
|
||||
<cell>b</cell>
|
||||
<cell>c</cell>
|
||||
<cell>d</cell>
|
||||
</row>
|
||||
</xsl:variable>
|
||||
<xsl:for-each select="exsl:node-set($tds)/row/cell">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
Reference in New Issue
Block a user