开发者

Can XPointer "follow" links?

开发者 https://www.devze.com 2023-03-01 08:18 出处:网络
I know I can specify a node another document using XPointer: http://www.google.com/#xpointer(...) But, can I specify an a/@href node in th开发者_开发技巧e current document, and point to a node in t

I know I can specify a node another document using XPointer:

http://www.google.com/#xpointer(...)

But, can I specify an a/@href node in th开发者_开发技巧e current document, and point to a node in that document?


Use something like this to go to the root node first, then back down to the hyperlink:

#xpointer(here()//ancestor::*[1]/ancestor::*[1]/descendant::a[@id='#1'])
0

精彩评论

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