[xquery-talk] Absolute Path of Node
EXTERNAL Kruse Peter (Praktikant;
external.Peter.Kruse at de.bosch.com
Mon May 30 17:04:49 PDT 2005
I was searching the archives but i can't find a straight forward solution for my problem. Please excuse if it already exists and i simply didn't find it.
Part 1: After doing a "let" or a "for" with //, is it posible to get the path from the root-node to the selected node? Maybe as string?
Like in this example:
let $anydepth := doc("file.xml")//somepath
for $element in $anydepth/special/*
I know the function path-from-root does not exist but is there something similar?
Part 2: I'd like to compare absolute pathes of two (or more) different nodes. So if one has a path like
and the other has
Is it possible, to make b the current node and do operations on it and its children? Something like nearest common ancestor? There had been discussions on the xsl lists but is there a xquery/xpath only solution?
Mit freundlichen Grüßen / Kind Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the talk