Loading TOC...


   $document-scope as xs:string,
   $uri as xs:string,
   $depth as xs:string?
) as element(dom:domain-scope)


Create a domain scope element.

document-scope The way in which this domain scope is defined: "collection", "directory", or "document".
uri The URI defining the scoping. For a "collection" scope this will be the collection URI; for a "directory" scope this will be the URI of the directory (and must therefore end with a trailing slash); for a "document" scope this will be the URI of the document.
depth This parameter applies only to "directory" scopes and defines whether the scope is recursive ("infinity") or not ("0").


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

  dom:set-domain-scope( "Test", 
                       dom:domain-scope( "document", 
		          () )

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.