Loading TOC...


   [$node as Node?]
) as String


Returns a string that uniquely identifies a given node.

If $node is the empty sequence, the zero-length string is returned.

If the function is called without an argument, the context item is used as the default argument. The behavior of the function when the argument is omitted is the same as if the context item is passed as an argument.

If the context item is undefined an error is raised: [err:XPDY0002]. If the context item is not a node an error is raised: [err:XPTY0004].

$node The node whose ID will be generated.


var doc = cts.doc("/bar.json");
=> naaaaffcc704258cd

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.