[libxslt] Add test for issue #37
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxslt] Add test for issue #37
- Date: Wed, 24 Jun 2020 14:18:46 +0000 (UTC)
commit ea1c27fca299f4f29d8bd1e29ac2ad21aea81bcc
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Wed Jun 24 16:10:45 2020 +0200
Add test for issue #37
This requires a recent version of libxml2 with commit libxml2@9f42f6ba.
tests/exslt/common/node-set.9.out | 2 ++
tests/exslt/common/node-set.9.xml | 4 ++++
tests/exslt/common/node-set.9.xsl | 28 ++++++++++++++++++++++++++++
3 files changed, 34 insertions(+)
---
diff --git a/tests/exslt/common/node-set.9.out b/tests/exslt/common/node-set.9.out
new file mode 100644
index 00000000..d75dd479
--- /dev/null
+++ b/tests/exslt/common/node-set.9.out
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<out><match/><match/></out>
diff --git a/tests/exslt/common/node-set.9.xml b/tests/exslt/common/node-set.9.xml
new file mode 100644
index 00000000..cf458854
--- /dev/null
+++ b/tests/exslt/common/node-set.9.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+
+<doc>
+</doc>
diff --git a/tests/exslt/common/node-set.9.xsl b/tests/exslt/common/node-set.9.xsl
new file mode 100644
index 00000000..bc76586f
--- /dev/null
+++ b/tests/exslt/common/node-set.9.xsl
@@ -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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]