xpath表达式"@*"是什么意思?

Edu*_*rdo 4 xml xslt xpath

Visual Studio上的Microsoft的XSLT模板具有类似于:

<xsl:template match="@* | node()">
Run Code Online (Sandbox Code Playgroud)

什么是@*

Way*_*ett 7

@*是for的缩写,attribute::*并选择上下文节点的所有属性(或者,在XSLT匹配模式中,更适合说它匹配所有属性).从XPath规范:

还有属性的缩写:attribute::可以缩写为@.例如,位置路径 para[@type="warning"]很短 child::para[attribute::type="warning"],因此选择具有值等于paratype属性的子项warning.