
thsr:remove-entry( $uri as xs:string*, $entry as item() ) as empty-sequence()
Removes all entries that exactly match $entry from the thesaurus documents(s) at $uri.
| Parameters | |
|---|---|
| uri | The URI of the thesaurus document(s). |
| $entry | A thesaurus entry, can either be an xml element or javascript object. |
xquery version "1.0-ml";
import module namespace
thsr="http://marklogic.com/xdmp/thesaurus"
at "/MarkLogic/thesaurus.xqy";
(: removes the second "Car" entry from the thesaurus document :)
thsr:remove-entry("/myThsrDocs/roget.xml",
thsr:lookup("/myThsrDocs/roget.xml","Car")[2])