是否可以在 xslt 中执行以下等效操作:
.//TagA[./TagB/[@AttrA='AttrAValue'] = 'TagBValue']
这在 Visual Studio 2008 中失败,并出现以下错误:
error: Unexpected token '[' in the expression.
.//TagA[./TagB/ -->[<-- @AttrA='AttrAValue'] = 'TagBValue']
这应该工作吗?这是 XSLT 的 MS 实现中的一个问题,还是有一种方法可以让所有 TagA 节点具有一个 TagB 节点,其 AttrA 等于 AttrAValue 并且其 TagB innerText 等于 TagBValue。