Loading TOC...

sc:schema

sc:schema(
   [$arg as item()]
) as schema-root()?

Summary

Returns the root schema of the item. The context item is used if no argument is given.

Parameters
arg The item whose associated schema is to be returned.

Example

declare namespace th="http://marklogic.com/xdmp/thesaurus";
xdmp:describe(
<th:thesaurus>
  <th:entry><th:term>dog</th:term>
     <th:synonym><th:term>canine</th:term></th:synonym>
  </th:entry>
</th:thesaurus>//th:entry/sc:schema()!sc:component-property("schema-location")
)
  =>
"thesaurus.xsd"

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