An xpath to be used in either xquery or XSLT to generate the heirarchical path to the current item
string-join(
(for $node in ancestor::*
return
concat($node/name(),
'[',
count($node/preceding-sibling::*[name() = $node/name()])+1,
']'
),
concat(name(),
'[',
count(preceding-sibling::*[name() = current()/name()]) + 1,
']'
)
),
'/')
No comments:
Post a Comment