Microsoft 在 Visual Studio 上的 XSLT 模板是这样的:
<xsl:template match="@* | node()">
什么是@*?
最佳答案
@*
是 attribute::*
的缩写,选择上下文节点的所有属性(或者,在 XSLT 匹配模式中,更恰本地说它匹配所有属性)。来自 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
.
关于xml - xpath 表达式 "@*"是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9082737/