diff options
author | William M. Brack <wbrack@src.gnome.org> | 2004-08-02 15:51:00 +0000 |
---|---|---|
committer | William M. Brack <wbrack@src.gnome.org> | 2004-08-02 15:51:00 +0000 |
commit | 58e98329ecf9ec88bdc04349a2c7bc64a220df63 (patch) | |
tree | df32208dcb3b6471f2d5c89d6add8ee6402709e0 /tests | |
parent | 391aed81b51dbad8608773e4c1f65fd917beb917 (diff) | |
download | libxslt-58e98329ecf9ec88bdc04349a2c7bc64a220df63.tar.gz libxslt-58e98329ecf9ec88bdc04349a2c7bc64a220df63.tar.bz2 libxslt-58e98329ecf9ec88bdc04349a2c7bc64a220df63.zip |
added code to assure keys are generated when needed for node-sets (bug
* libxslt/documents.c, libxslt/functions.c, libxslt/transform.c,
libxslt/variables.c: added code to assure keys are generated
when needed for node-sets (bug 148773)
* tests/exslt/common/node-set.7.* - added test case for above.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/exslt/common/Makefile.am | 1 | ||||
-rw-r--r-- | tests/exslt/common/node-set.7.out | 2 | ||||
-rw-r--r-- | tests/exslt/common/node-set.7.xml | 1 | ||||
-rw-r--r-- | tests/exslt/common/node-set.7.xsl | 28 |
4 files changed, 32 insertions, 0 deletions
diff --git a/tests/exslt/common/Makefile.am b/tests/exslt/common/Makefile.am index 7a1f6126..39decd98 100644 --- a/tests/exslt/common/Makefile.am +++ b/tests/exslt/common/Makefile.am @@ -10,6 +10,7 @@ EXTRA_DIST = \ node-set.4.xml node-set.4.xsl node-set.4.out \ node-set.5.xml node-set.5.xsl node-set.5.out \ node-set.6.xml node-set.6.xsl node-set.6.out \ + node-set.7.xml node-set.7.xsl node-set.7.out \ object-type.1.xml object-type.1.xsl object-type.1.out \ import-test1a.imp import-test1b.imp import-test1.out \ import-test1.xml import-test1.xsl diff --git a/tests/exslt/common/node-set.7.out b/tests/exslt/common/node-set.7.out new file mode 100644 index 00000000..dfb17cf5 --- /dev/null +++ b/tests/exslt/common/node-set.7.out @@ -0,0 +1,2 @@ +<?xml version="1.0"?> +A diff --git a/tests/exslt/common/node-set.7.xml b/tests/exslt/common/node-set.7.xml new file mode 100644 index 00000000..8eb294b5 --- /dev/null +++ b/tests/exslt/common/node-set.7.xml @@ -0,0 +1 @@ +<root>junk</root> diff --git a/tests/exslt/common/node-set.7.xsl b/tests/exslt/common/node-set.7.xsl new file mode 100644 index 00000000..7f1068ec --- /dev/null +++ b/tests/exslt/common/node-set.7.xsl @@ -0,0 +1,28 @@ +<xsl:transform + version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:exsl="http://exslt.org/common" + extension-element-prefixes="exsl"> + + <xsl:key name="k" match="a" use="@x"/> + + <xsl:template match="/"> + <xsl:variable name="v"> + <n> + <a x="1" y="A"/> + <a x="2" y="B"/> + </n> + </xsl:variable> + <xsl:apply-templates select="exsl:node-set($v)/*"/> + </xsl:template> + + <xsl:template match="n"> +<!-- <xsl:apply-templates select="a[@x='1']"/> --> + <xsl:apply-templates select="key('k','1')"/> + </xsl:template> + + <xsl:template match="a"> + <xsl:value-of select="@y"/> + </xsl:template> + +</xsl:transform> |