fn:generate-id( [$node as node()?] ) as xs: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].
Parameters | |
---|---|
node | The node whose ID will be generated. |
let $x := doc("auction.xml") return fn:generate-id($x) => n965c71980e85a011
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.