github.com/matislovas/ratago@v0.0.0-20240408115641-cc0857415a7a/xslt/testdata/general/bug-141.xsl (about) 1 <?xml version='1.0'?> 2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 3 version="1.0"> 4 <xsl:template match="/"> 5 <xsl:apply-templates select="//page"/> 6 </xsl:template> 7 8 <xsl:template match="page"> 9 10 current page : <xsl:value-of select="@name"/> 11 -------------------- 12 dump union : "<xsl:for-each 13 select="(preceding-sibling::page[1]|parent::group[1]|/document)"> 14 <xsl:value-of select="name()"/>,</xsl:for-each>" 15 union-last : <xsl:value-of select="name( 16 (preceding-sibling::page[1]|parent::group[1]|/document)[last()] )"/> 17 union-last (without /root) : <xsl:value-of select="name( 18 (preceding-sibling::page[1]|parent::group[1])[last()] )"/> 19 preceeding-sibling <xsl:value-of select="name(preceding-sibling::page[1])"/> 20 parent-group <xsl:value-of select="name(parent::group[1])"/> 21 root <xsl:value-of select="name(/document)"/> 22 ----------------------- 23 </xsl:template> 24 25 </xsl:stylesheet>