scaffolding.harmonize.xqy.content.xqy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of marklogic-data-hub Show documentation
Show all versions of marklogic-data-hub Show documentation
Library for Creating an Operational Data Hub on MarkLogic
xquery version "1.0-ml";
module namespace plugin = "http://marklogic.com/data-hub/plugins";
declare namespace es = "http://marklogic.com/entity-services";
declare option xdmp:mapping "false";
(:~
: Create Content Plugin
:
: @param $id - the identifier returned by the collector
: @param $options - a map containing options. Options are sent from Java
:
: @return - your transformed content
:)
declare function plugin:create-content(
$id as xs:string,
$options as map:map) as item()?
{
let $doc := fn:doc($id)
return
if ($doc/es:envelope) then
$doc/es:envelope/es:instance/node()
else if ($doc/envelope/instance) then
$doc/envelope/instance
else
$doc
};
© 2015 - 2024 Weber Informatics LLC | Privacy Policy