Reputation: 5933
Microsoft's XSLT template on Visual Studio has something like:
<xsl:template match="@* | node()">
What is @*?
Upvotes: 4
Views: 2208
Reputation: 60414
@*
is short for attribute::*
and selects all attributes of the context node (or, in an XSLT match pattern, it's more appropriate to say that it matches all attributes). From the XPath spec:
There is also an abbreviation for attributes:
attribute::
can be abbreviated to@
. For example, a location pathpara[@type="warning"]
is short forchild::para[attribute::type="warning"]
and so selectspara
children with atype
attribute with value equal towarning
.
Upvotes: 8
Reputation: 499002
From MSDN - XPath Examples:
@* | All attributes of the current element context.
Upvotes: 1
Reputation: 52858
That means match any attribute.
http://www.w3.org/TR/1999/REC-xpath-19991116/#path-abbrev
Upvotes: 2