Loading TOC...

MarkLogic Server 11.0 Product Documentation
lnk functions (Links)

The links module is installed as part of the Content Processing Framework. These functions are used to manage the relationships among documents in the database, for example, as between a binary source document and an XML document generated by a conversion process from that source document. The Content Processing Framework will use links to determine if related documents should also be removed when a document is deleted from the database.

To use the links module as part of your own XQuery module, include the following line in your XQuery prolog:

import module namespace lnk = "http://marklogic.com/cpf/links" at "/MarkLogic/cpf/links.xqy";

The library namespace prefix lnk is not predefined in the server.

6 functions
Function name Description
lnk:create Create a link between the two given documents with the given role labels and strength.
lnk:from Find and return all the links from the given document to some other.
lnk:get Find and return the link between the two documents, if any.
lnk:insert Insert the given link.
lnk:remove Remove the link between the two given documents and return the removed link.
lnk:to Find and return all the links to the given document from some other.