lnk:create( $from as xs:string, $to as xs:string, $role as xs:string, $rev-role as xs:string, $strength as xs:string ) as empty-sequence()
Create a link between the two given documents with the given role labels and strength. An error is raised if either of the documents involved does not exist or if the link would be invalid for some reason. This function will replace any existing link between those two documents with the new link.
xquery version "1.0-ml"; import module namespace lnk = "http://marklogic.com/cpf/links" at "/MarkLogic/cpf/links.xqy"; lnk:create( "/myDocs/example.xhtml", "/myDocs/example.doc", "source", "conversion", "strong" )
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.