+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
bug-138.xml \
bug-139.xml \
bug-140.xml \
+ bug-141.xml \
character.xml \
array.xml \
items.xml
--- /dev/null
+<?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>
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 \
--- /dev/null
+<?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
+-----------------------
+
--- /dev/null
+<?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>