Loading TOC...

MarkLogic Server 11.0 Product Documentation
sec:security-path-namespace

sec:security-path-namespace(
   $prefix as xs:string,
   $namespace-uri as xs:string
) as element(sec:path-namespace)

Summary

This function creates a protected namespace. The result can be passed into other functions as part of the permissions parameter.

Parameters
prefix Prefix for the namespace to be protected.
namespace-uri The URI for the namespace.

Example


 (: execute this against the Security database :)
 
xquery version "1.0-ml"; 
import module namespace sec = "http://marklogic.com/xdmp/security" 
      at "/MarkLogic/security.xqy";
	  
let $prefix := "ml",
$namespace-uri := "marklogic.com"
return
sec:security-path-namespace($prefix, $namespace-uri)

=>
<path-namespace xmlns="http://marklogic.com/xdmp/security">
<prefix>ml</prefix>
<namespace-uri>marklogic.com</namespace-uri>
</path-namespace>
    

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