After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 314282 - "." selects child nodes when used with union operator
"." selects child nodes when used with union operator
Status: VERIFIED FIXED
Product: libxml2
Classification: Platform
Component: general
2.6.20
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2005-08-23 15:54 UTC by Richard Li
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Richard Li 2005-08-23 15:54:28 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.
Comment 1 Daniel Veillard 2005-08-25 22:11:53 UTC
Right it's a different bug, confirmed.

Daniel
Comment 2 Daniel Veillard 2005-09-04 12:02:49 UTC
Okay, fixed in CVS, I hope there is no more pattern induced bugs left !

 thanks,

Daniel
Comment 3 Daniel Veillard 2005-09-05 08:59:24 UTC
This should be closed by release of libxml2-2.6.21,

  thanks,

Daniel