MarkLogic 10 Product Documentation
entity:dictionary-insert

entity:dictionary-insert(
   $uri as xs:string,
   $dictionary as cts:entity-dictionary
) as empty-sequence()

Summary

Put an entity dictionary into the database in the appropriate format.

Parameters
uri The URI of the dictionary.
dictionary The entity dictionary to insert.

Usage Notes

Important: When inserting a dictionary created from a SKOS graph, do not use the source graph URI for the dictionary URI. Doing so interferes with subsequent use of the graph.

See Also

Example

import module namespace entity="http://marklogic.com/entity"
  at "/MarkLogic/entity.xqy";

let $dictionary :=
  cts:entity-dictionary(
    for $code in //medical-code
    for $subcode in $code/subcode
    return
      cts:entity($code/@id, $code/@code, $subcode/@code, $code/description),
      "case-sensitive")
return entity:dictionary-insert("/ontology/medical", $dictionary);
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy