...">

What does the xpath expression "@ *" mean?

The Microsoft XSLT template in Visual Studio has something like:

<xsl:template match="@* | node()"> 

What is @ * ?

+4
source share
3 answers

@* abbreviated for attribute::* and selects all the attributes of the node context (or in the XSLT matching pattern it is more appropriate to say that it matches all the attributes). From the XPath specification :

There is also an abbreviation for attributes: attribute:: may be abbreviated @ . For example, the location path para[@type="warning"] not suitable for child::para[attribute::type="warning"] and therefore selects para children with the type attribute with a value equal to warning .

+7
source
+2
source

From MSDN - XPath Examples :

@ * | All attributes of the current context of the element.

+1
source

Source: https://habr.com/ru/post/1394010/


All Articles