
sc.name( [arg as schemaComponent()] ) as xs.QName?
Returns the name of the schema component, if any. The context item is used if no argument is given.
| Parameters | |
|---|---|
| arg | The item whose name is to be returned. |
xdmp.describe(fn.head(xdmp.unquote(
'<th:thesaurus xmlns:th="http://marklogic.com/xdmp/thesaurus">\n\
<th:entry><th:term>dog</th:term>\n\
<th:synonym><th:term>canine</th:term></th:synonym>\n\
</th:entry>\n\
</th:thesaurus>')).root.xpath(
"/th:thesaurus/th:entry/element()[2]/sc:type()!sc:name()",
{th:"http://marklogic.com/xdmp/thesaurus"}));
=>
fn.QName("http://marklogic.com/xdmp/thesaurus","synonym")
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.