MarkLogic Server 11.0 Product Documentation
dom:create

dom:create(
   $name as xs:string,
   $description as xs:string,
   $scope as element(dom:domain-scope),
   $context as element(dom:evaluation-context),
   $pipelines as xs:unsignedLong*,
   $permissions as item()*
) as xs:unsignedLong

Summary

Create a new content processing domain, along with the triggers that perform work in that domain.

Parameters
name The name of the domain. It must be unique.
description A description of the domain.
scope The scope of the domain. Create using dom:domain-scope.
context The evaluation context for processing actions. Create using dom:evaluation-context.
pipelines The unique identifiers of the pipelines to bind to this domain. The same pipeline can be bound to different domains. Until at least one pipeline is bound to the domain, no processing is defined for that domain.
permissions Permissions. When run in an XQuery context, the permissions are a sequence of XML elements (sec:permission). When importing this module into a Server-Side JavaScript context, the permissions are an array of Objects.

Example

  xquery version "1.0-ml";
  import module namespace dom = "http://marklogic.com/cpf/domains" 
		  at "/MarkLogic/cpf/domains.xqy";

  dom:create( "Incoming", "Handling incoming documents", 
              dom:domain-scope( "directory", 
                    "/incoming/", 
		    "infinity" ),
	      dom:evaluation-context( xdmp:database("Modules"), 
		                     "/" ),
              (), () )
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy