Federico, I think the documentation in node-position.xq needs some more work. I 
can do this, but first we must agree on what is exactly the functionality and 
the assumptions about node positions that you rely on. For example, in the 
documentation of the np:node-position() function, you write:

"The returned URI is stable, i.e. it does not change when other nodes are 
inserted, deleted or modified"

Do you rely on this? If not, then we shouldn't write it down.

Also, look at the following rewrite of the ancestor-of function. Do you agree 
with it?

 : Determines whether the node position that is given as second argument is
 : an ancestor of the node position is given as first argument.
 : If the two positions were obtained within the same snapshot S, then the 
 : result of the function applies to the corresponding nodes as well, that
 : is, within snapshot S, the second node is an ancestor of the first. 
 : Otherwise, the result of the function does not imply anything about the 
 : positional relationship of the two nodes.
 : @param $pos1 the potential descendant node position
 : @param $pos2 the potential ancestor node position
 : @return true if the node position $pos2 is an ancestor of the node position
 : $pos1; false otherwise.
 : @error zerr:ZAPI0028 if one of the given URI is not a valid node
 : position computed by the <tt>np:node-position</tt> function. 
declare function np:ancestor-of(
  $pos1 as xs:anyURI,
  $pos2 as xs:anyURI) as xs:boolean external;

Your team Zorba Coders is subscribed to branch lp:zorba.

Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to