lnk:insert( $link as element(lnk:link) ) as empty-sequence()
Insert the given link. An error is raised if either of the documents involved does not exist or if the link is invalid in some way. This function will replace any existing link between those two documents.
Parameters | |
---|---|
link | The link element. |
xquery version "1.0-ml"; import module namespace lnk = "http://marklogic.com/cpf/links" at "/MarkLogic/cpf/links.xqy"; lnk:insert( lnk:get( "/myDocs/fr/example.xhtml", "/myDocs/example.xhtml" ) )