MarkLogic 12 EA 1 Product Documentation
spell:insert

spell:insert(
   $uri as xs:string,
   $dict as item()
) as empty-sequence()

Summary

Load the words in $dict into the dictionary at $uri. If there is no document at $uri a new one will be created. If there is a document at $uri it will be overwritten.

Parameters
uri The URI of the dictionary.
$dict A dictionary document which can be an xml element, a javascript object or a json object-node.

Example

  xquery version "1.0-ml";
  import module namespace spell = "http://marklogic.com/xdmp/spell" 
		  at "/MarkLogic/spell.xqy";

  spell:insert("/mySpell/special.xml", 
     <dictionary xmlns="http://marklogic.com/xdmp/spell">
          <word>WebDAV</word>
     </dictionary> )

  => Creates a dictionary with only the word "WebDAV" 
     at the specified URI
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy