Loading TOC...

sec.securityPathNamespace

sec.securityPathNamespace(
   $prefix as String,
   $namespace-uri as String
) as element(sec.pathNamespace)

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.
declareUpdate();
const sec = require('/MarkLogic/security');

sec.securityPathNamespace('ml', 'marklogic.com');

// Returns ==>
// <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.