GNOME Bugzilla – Bug 314282
"." selects child nodes when used with union operator
Last modified: 2009-08-15 18:40:50 UTC
Please describe the problem: I have a select expression in xsl:for-each that has an union operator and ".", instead of selecting the current node, "." selects all the child nodes. Steps to reproduce: 1. test xml document: <?xml version="1.0" encoding="UTF-8"?> <root> <element>I'm root's element</element> <child> <element>I'm child's element</element> </child> </root> 2. Test style sheet: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="root"> <xsl:for-each select='./group|.'> <xsl:value-of select="./element"/> </xsl:for-each> </xsl:template> </xsl:stylesheet> 3. Process with this command: xsltproc test.xsl test.xml Actual results: <?xml version="1.0"?> I'm child's element Expected results: <?xml version="1.0"?> I'm root's element Does this happen every time? Yes Other information: I recently upgraded from 2.6.11 to 2.6.20. 2.6.11 does not have this problem, problem occured only after upgraded to 2.6.20. Also, I noticed a similar bug, 306348, was reported and fixed before 2.6.20 release.
Right it's a different bug, confirmed. Daniel
Okay, fixed in CVS, I hope there is no more pattern induced bugs left ! thanks, Daniel
This should be closed by release of libxml2-2.6.21, thanks, Daniel