1
0
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:
Nick Wellnhofer
2020-06-24 16:10:45 +02:00
parent 1e2b460488
commit ea1c27fca2
3 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
<?xml version="1.0"?>
<out><match/><match/></out>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<doc>
</doc>

View 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>