{ "ns" : "http://zorba.io/modules/node-position", "description" : "
This module provides a function (np:node-position) that, given a node,\n returns positional information about the node in the form of an xs:anyURI\n item. The module also defines functions that use such positional information\n to determine: (1) positional relationships between two nodes (e.g. if one\n is the ancestor of another) and (2) positional properties of a single node\n (e.g. its level in the tree).
\n\n
Within this module, the term \"node position\" will be used to refer to an\n xs:anyURI item that is returned by the np:node-position function.
\n", "sees" : [ ], "authors" : [ "Determines whether the node position given as second argument is\n an ancestor of the node position given as first argument.
\n\n
If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is an ancestor of the first.
\nOtherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.
\n", "summary" : "Determines whether the node position given as second argument is\n an ancestor of the node position given as first argument.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "" }, { "name" : "pos2", "type" : "xs:anyURI", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the node position $n-pos2 is an ancestor of the node position $n-pos1; false otherwise." }, "errors" : [ "Determines whether the node position given as second argument is\n an attribute of the node position given as first argument.
\n\n
If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is an attribute of the first.
\nOtherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.
\n", "summary" : "Determines whether the node position given as second argument is\n an attribute of the node position given as first argument.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "Determines whether the node position given as second argument is\n a child of the node position given as first argument.
\n\n
If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is a child of the first.
\nOtherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.
\n", "summary" : "Determines whether the node position given as second argument is\n a child of the node position given as first argument.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "Determines whether the node position given as second argument is\n a descendant of the node position given as first argument.
\n\n
If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is a descendant of the first.
\nOtherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.
\n", "summary" : "Determines whether the node position given as second argument is\n a descendant of the node position given as first argument.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "Determines whether the node position given as second argument is\n following in document order the node position given as first argument.
\n\n
If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is following in document order the\n first.
\nOtherwise, the result of the function does not imply anything about\n the positional relationship of the two nodes.
\n", "summary" : "Determines whether the node position given as second argument is\n following in document order the node position given as first argument.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "Determines whether the node position given as second argument is\n following the node position given as first argument.
\n\n
If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is following the first.
\nOtherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.
\n", "summary" : "Determines whether the node position given as second argument is\n following the node position given as first argument.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "Determines whether the node position given as second argument is\n a following-sibling of the node position given as first argument.
\n\n
If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is a following-sibling of the first.
\nOtherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.
\n", "summary" : "Determines whether the node position given as second argument is\n a following-sibling of the node position given as first argument.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "Determines whether a node position belongs to a collection.
\n", "summary" : "Determines whether a node position belongs to a collection.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos", "type" : "xs:anyURI", "occurence" : null, "description" : "Determines whether two node positions belong to the same collection.
\n\n
If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the two nodes belong to the same collection.
\nOtherwise, the result of the function does not imply anything about\n the positional relationship of the two nodes.
\n", "summary" : "Determines whether two node positions belong to the same collection.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "Determines whether two node positions belong to the same tree.
\n\n
If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the two nodes belong to the same tree.
\nOtherwise, the result of the function does not imply anything about\n the positional relationship of the two nodes.
\n", "summary" : "Determines whether two node positions belong to the same tree.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "Determines whether the node position given as second argument belongs\n to the subtree rooted at the node position given as first argument.
\n\n
If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node belongs to the subtree rooted at the\n first. Otherwise, the result of the function does not imply anything about\n the positional relationship of the two nodes.
\n\n
This function differs from np:descendant-of in the way it treats attribute\n nodes. np:descendant-of follows the XQuery/XPath specification for the\n descendant axis, and as a result, it does not consider attributes as\n descendants of any nodes; it will always return false if $n-pos2 was\n obtained from an attribute node.In contrast, np:in-subtree-of will return\n true if $n-pos2 was obtained from an attribute node that appeared in the\n subtree of the node that $n-pos1 was obtained from.
\n", "summary" : "Determines whether the node position given as second argument belongs\n to the subtree rooted at the node position given as first argument.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "Determines whether a node position corresponds to an attribute node.
\n", "summary" : "Determines whether a node position corresponds to an attribute node.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the node position $n-pos corresponds to an attribute; false otherwise." }, "errors" : [ "Determines whether a node position corresponds to a comment node.
\n", "summary" : "Determines whether a node position corresponds to a comment node.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the node position $n-pos corresponds to an comment; false otherwise." }, "errors" : [ "Determines whether a node position corresponds to a document node.
\n", "summary" : "Determines whether a node position corresponds to a document node.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the node position $n-pos corresponds to a document; false otherwise." }, "errors" : [ "Determines whether a node position corresponds to an element node.
\n", "summary" : "Determines whether a node position corresponds to an element node.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the node position $n-pos corresponds to an element; false otherwise." }, "errors" : [ "Determines whether a node position corresponds to an processing-instruction\n node.
\n", "summary" : "Determines whether a node position corresponds to an processing-instruction\n node.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the node position $n-pos corresponds to a processing instruction; false otherwise." }, "errors" : [ "Determines whether a node position corresponds to a text node.
\n", "summary" : "Determines whether a node position corresponds to a text node.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "" } ], "returns" : { "type" : "xs:boolean", "description" : "true if the node position $n-pos corresponds to a text; false otherwise." }, "errors" : [ "Computes the level of a node position in its tree.
\n\n
Note: The root node of a tree is at level one.
\n\n
The result of the function applies to the corresponding node as well,\n that is, within the snapshot in which the position was computed, the node\n level is the returned one.
\nThe result of the function does not imply anything about the\n node level in other snapshots.
\n", "summary" : "Computes the level of a node position in its tree.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos", "type" : "xs:anyURI", "occurence" : null, "description" : "Return a URI item containing positional information for a given node.
\n\n
Within a snapshot, each has a different positional URI. However,\n different nodes in different snapshots might have the same URI.
\n", "summary" : "Return a URI item containing positional information for a given node.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "arg", "type" : "node()", "occurence" : null, "description" : "Determines whether the node position given as second argument is\n the parent of the node position given as first argument.
\n\n
If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is the parent of the first.
\nOtherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.
\n", "summary" : "Determines whether the node position given as second argument is\n the parent of the node position given as first argument.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "Determines whether the node position given as second argument is\n preceding in document order the node position given as first argument.
\n\n
If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is preceding in document order the\n first.
\nOtherwise, the result of the function does not imply anything about\n the positional relationship of the two nodes.
\n", "summary" : "Determines whether the node position given as second argument is\n preceding in document order the node position given as first argument.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "Determines whether the node position given as second argument is\n preceding the node position given as first argument.
\n\n
If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is preceding the first.
\nOtherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.
\n", "summary" : "Determines whether the node position given as second argument is\n preceding the node position given as first argument.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "Determines whether the node position given as second argument is\n a preceding-sibling of the node position given as first argument.
\n\n
If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is a preceding-sibling of the first.
\nOtherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.
\n", "summary" : "Determines whether the node position given as second argument is\n a preceding-sibling of the node position given as first argument.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "Determines whether two node positions are siblings.
\n\n
If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is a sibling of the first.
\nOtherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.
\n", "summary" : "Determines whether two node positions are siblings.
", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "n-pos1", "type" : "xs:anyURI", "occurence" : null, "description" : "