Loading TOC...

sc.name

sc.name(
   [$arg as schemaComponent()]
) as xs.QName?

Summary

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.

Example

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")

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy