MarkLogic Server 11.0 Product Documentation
lnk:insert

lnk:insert(
   $link as element(lnk:link)
) as empty-sequence()

Summary

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.

Example

  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" ) )
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy