mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-11-02 13:33:20 +03:00
Add test for issue #37
This requires a recent version of libxml2 with commit libxml2@9f42f6ba.
This commit is contained in:
2
tests/exslt/common/node-set.9.out
Normal file
2
tests/exslt/common/node-set.9.out
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0"?>
|
||||
<out><match/><match/></out>
|
||||
4
tests/exslt/common/node-set.9.xml
Normal file
4
tests/exslt/common/node-set.9.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<doc>
|
||||
</doc>
|
||||
28
tests/exslt/common/node-set.9.xsl
Normal file
28
tests/exslt/common/node-set.9.xsl
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:exslt="http://exslt.org/common"
|
||||
extension-element-prefixes="exslt">
|
||||
|
||||
<!-- https://gitlab.gnome.org/GNOME/libxslt/-/issues/37 -->
|
||||
|
||||
<xsl:variable name="tree1">
|
||||
<a><b><c><d/></c></b></a>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="tree2">
|
||||
<a><b><c><d/></c></b></a>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:template match="a">
|
||||
<xsl:for-each select="/*">
|
||||
<match/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/">
|
||||
<out>
|
||||
<xsl:apply-templates select="exslt:node-set($tree1)/a | exslt:node-set($tree2)/a"/>
|
||||
</out>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
Reference in New Issue
Block a user