Read XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition Online
Authors: Michael Kay
The@
Abbreviation
When the@
sign appears in front of a
NodeTest
, it indicates that you are selecting nodes using the attribute axis. It is short forattribute::
.
What this means in practice is that in a path expressionA/@B
,
B
is referring to an attribute of
A
, while in the path expressionA/B
,
B
is referring to a child element of
A
.
Again, this abbreviation is ubiquitous among XPath developers, and it's rare to seeattribute::
written out in full. In fact, the
@
in front of an attribute name has become so familiar that people often think of it as being almost part of the name. I'm probably not the only one who has found myself typing