例如:这是一个 xslt
<xsl:template match="/root/sub-root/parent/child/grand_child/dummy1/dummy2/dummy3/dummy4/node_1
|/root/sub-root/parent/child/grand_child/dummy1/dummy2/dummy3/dummy4/node_2
|/root/sub-root/parent/child/grand_child/dummy1/dummy2/dummy3/dummy4/node_3
.
.
|/root/sub-root/parent/child/grand_child/dummy1/dummy2/dummy3/dummy4/node_N"/>
在上面的代码中,我可以
/root/sub-root/parent/child/grand_child/dummy1/dummy2/dummy3/dummy4
只使用一次 XPath [使用大括号或其他] 并减少代码的体积吗?
如您所见,所有节点都是彼此的兄弟,所以除了它们的名称之外,它们的 Xpath 是相同的。有没有短手财产?
XSLT 1.0(或 Xpath1.0)是否允许它?