
entity:dictionary-insert( $uri as xs:string, $dictionary as cts:entity-dictionary ) as empty-sequence()
Put an entity dictionary into the database in the appropriate format.
| Parameters | |
|---|---|
| uri | The URI of the dictionary. |
| dictionary | The entity dictionary to insert. |
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);