xdmp:describe( $item as item()*, [$max-sequence-length as xs:unsignedInt?], [$max-item-length as xs:unsignedInt?] ) as xs:string
Returns a string representing the description of a given item sequence. If you take the output of this function and evaluate it as an XQuery program, it returns the item(s) input to the function.
If you specify an item that is in a database, this function
returns the path to the item (or to the items if you specify multiple items).
If the item or items are constructed in XQuery, then it prints out the item,
truncating the characters in each item according to the
max-item-length
parameter.
xdmp:describe(current-date()) => xs:date("2007-01-15-08:00")
let $x := <mynode>Some text here.</mynode> return xdmp:describe($x) => <mynode>Some text here.</mynode>
(: assume /mydoc.xml is an XML document with the following content: <mynode>Some text here.</mynode> :) xdmp:describe(doc("/mydoc.xml")/mynode) => doc("/mydoc.xml")/mynode
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.