开发者

canonical xpath problems?

开发者 https://www.devze.com 2023-03-15 06:32 出处:网络
If a single dot is converted into self()::node() in xpath, Source开发者_如何转开发 Then why does this work:

If a single dot is converted into self()::node() in xpath, Source

开发者_如何转开发

Then why does this work:

<xsl:value-of select="self::node()[name()='QWE']"/>

but not this?:

<xsl:value-of select=".[name()='QWE']"/>


Because the expression

.[name()='QWE']

is illegal XPath 1.0 syntax, an abbreviated step may not contain a predicate. XPath 2.0 doesn't have this restriction.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号