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 743682 - Changing behaviour between 1.1.17
Changing behaviour between 1.1.17
Status: RESOLVED NOTABUG
Product: libxslt
Classification: Platform
Component: general
1.1.26
Other Linux
: Normal major
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2015-01-29 09:52 UTC by gilles.vautier
Modified: 2015-08-08 17:38 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description gilles.vautier 2015-01-29 09:52:35 UTC
With xsltproc with libxslt version 1.1.17 the following process line

<xsl:apply-templates select="@*[not(self::date_maj)]|node()"/>

process all childs and attribute of the current node except date_maj attribute.

In version 1.1.26 the same line doesn't except the date_maj attribute and I have to change the process line to :

<xsl:apply-templates select="@*[name()!='date_maj']|node()"/>
Comment 1 Nick Wellnhofer 2015-08-08 17:38:15 UTC
The new behavior of libxslt is correct. Using the self axis and a name test with an attribute as context node should return an empty node set. From the XPath spec:

"Every axis has a principal node type. If an axis can contain elements, then the principal node type is element; otherwise, it is the type of the nodes that the axis can contain. Thus,

- For the attribute axis, the principal node type is attribute.
- For the namespace axis, the principal node type is namespace.
- For other axes, the principal node type is element.

A node test that is a QName is true if and only if the type of the node (see [5 Data Model]) is the principal node type and has an expanded-name equal to the expanded-name specified by the QName."

The principal node type of the self axis is element. So a node test on the self axis that is a QName can never be true for an attribute since attributes aren't elements. Only the node test "self::node()" can return the attribute itself.