Take a look at the function signature at 
http://docs.marklogic.com/xdmp:document-set-permissions

xdmp:document-set-permissions(
  $uri as xs:string,
  $permissions as element(sec:permission)*
) as empty-sequence()

You're supplying an arg2 as xs:string+, when it has to be 
element(sec:permission)*. Use http://docs.marklogic.com/xdmp:permission to 
construct a permission element, as in the docs example:

xdmp:document-set-permissions(
    "/example.xml", 
    (xdmp:permission("development", "update"), 
     xdmp:permission("qa", "read")))

-- Mike

On 1 Apr 2013, at 13:58 , "Khan, Kashif" <[email protected]> wrote:

> I am running the following query to give "Access-Role" read permission but
> I get the error  "[1.0-ml] XDMP-NOTANODE: (err:XPTY0019)
> xdmp:document-set-permissions(fn:document-uri($x), ("Access-Role","read"))
> -- "AHD-Access-Role" is not a node"
> 
> for $x in xdmp:directory("/app/", "1")
> return
> xdmp:document-set-permissions(fn:document-uri($x), ("Access-Role","read"))
> 
> 
> Any help in understanding this issue will be greatly appreciated.
> 
> ‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹
> Kashif Khan
> 
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
> 

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to