added test case for Bug 13971 (libxml2 xpath.c bug, but tested here)
authorWilliam M. Brack <wbrack@src.gnome.org>
Thu, 22 Jan 2004 02:38:46 +0000 (02:38 +0000)
committerWilliam M. Brack <wbrack@src.gnome.org>
Thu, 22 Jan 2004 02:38:46 +0000 (02:38 +0000)
* tests/general/Makefile.am, tests/general/bug-141.out,
  tests/general/bug-141.xsl, tests/docs/Makefile.am,
  tests/general/bug-141.xml: added test case for
  Bug 13971 (libxml2 xpath.c bug, but tested here)

ChangeLog
tests/docs/Makefile.am
tests/docs/bug-141.xml [new file with mode: 0644]
tests/general/Makefile.am
tests/general/bug-141.out [new file with mode: 0644]
tests/general/bug-141.xsl [new file with mode: 0644]

index 3d10819..3288dfa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Thu Jan 22 10:35:14 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+       * tests/general/Makefile.am, tests/general/bug-141.out,
+         tests/general/bug-141.xsl, tests/docs/Makefile.am,
+         tests/general/bug-141.xml: added test case for
+         Bug 13971 (libxml2 xpath.c bug, but tested here)
+
 Fri Jan 16 22:15:34 HKT 2004 William Brack <wbrack@mmm.com.hk>
 
        * libxslt/xsltutils.c: added a newline for any comment before
index 2c3f248..467bd50 100644 (file)
@@ -140,6 +140,7 @@ EXTRA_DIST =        \
        bug-138.xml \
        bug-139.xml \
        bug-140.xml \
+       bug-141.xml \
        character.xml \
        array.xml \
        items.xml
diff --git a/tests/docs/bug-141.xml b/tests/docs/bug-141.xml
new file mode 100644 (file)
index 0000000..115b7c3
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<document name="doc">
+  <group name="group">
+    <page name="1"/>
+    <page name="2"/>
+    <page name="3"/>
+    <page name="4"/>
+  </group>
+</document>
index 0e2e311..64f6a99 100644 (file)
@@ -146,6 +146,7 @@ EXTRA_DIST = \
     bug-138.out bug-138.xsl \
     bug-139.out bug-139.xsl \
     bug-140.out bug-140.xsl \
+    bug-141.out bug-141.xsl \
     character.out character.xsl \
     character2.out character2.xsl \
     itemschoose.out itemschoose.xsl \
diff --git a/tests/general/bug-141.out b/tests/general/bug-141.out
new file mode 100644 (file)
index 0000000..3c384b7
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+
+
+current page : 1
+--------------------
+  dump union : "document,group,"
+  union-last : group
+  union-last (without /root) : group
+  preceeding-sibling 
+  parent-group group
+  root document
+-----------------------
+
+
+current page : 2
+--------------------
+  dump union : "document,group,page,"
+  union-last : page
+  union-last (without /root) : page
+  preceeding-sibling page
+  parent-group group
+  root document
+-----------------------
+
+
+current page : 3
+--------------------
+  dump union : "document,group,page,"
+  union-last : page
+  union-last (without /root) : page
+  preceeding-sibling page
+  parent-group group
+  root document
+-----------------------
+
+
+current page : 4
+--------------------
+  dump union : "document,group,page,"
+  union-last : page
+  union-last (without /root) : page
+  preceeding-sibling page
+  parent-group group
+  root document
+-----------------------
+
diff --git a/tests/general/bug-141.xsl b/tests/general/bug-141.xsl
new file mode 100644 (file)
index 0000000..b6fb72f
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+<xsl:template match="/">
+  <xsl:apply-templates select="//page"/>
+</xsl:template>
+
+<xsl:template match="page">
+
+current page : <xsl:value-of select="@name"/>
+--------------------
+  dump union : "<xsl:for-each
+select="(preceding-sibling::page[1]|parent::group[1]|/document)">
+    <xsl:value-of select="name()"/>,</xsl:for-each>"
+  union-last : <xsl:value-of select="name(
+(preceding-sibling::page[1]|parent::group[1]|/document)[last()] )"/>
+  union-last (without /root) : <xsl:value-of select="name(
+(preceding-sibling::page[1]|parent::group[1])[last()] )"/>
+  preceeding-sibling <xsl:value-of select="name(preceding-sibling::page[1])"/>
+  parent-group <xsl:value-of select="name(parent::group[1])"/>
+  root <xsl:value-of select="name(/document)"/>
+-----------------------
+</xsl:template>
+
+</xsl:stylesheet>