rdt:rule-validate( $rule-collection as xs:string* ) as xs:string*
Validate the redaction rules in one or more redaction rule collections and return the URIs of the rule documents validated.
Parameters | |
---|---|
rule-collection | The URIs of the collections that contains the redaction rules to be validated. The collections must not contain any non-rule documents. |
redaction-user
role or the
following privilege:
http://marklogic.com/xdmp/privileges/redaction-user
RDT-BADRULE
. If a rule names a custom redaction for a module
that is not installed in MarkLogic, the exception
RDT-MODNOTFOUND
is thrown.
Validation does not check the contents of the options
section of a rule because this data is redaction-function specific, rather
than a general characteristic of all redaction rules. If the rule uses
dictionary-based masking, no validation is performed on the dictionary.
The collection(s) can contain XML rules, JSON rules, or both, but must not contain non-rule documents.
xquery version "1.0-ml"; import module namespace rdt = "http://marklogic.com/xdmp/redaction" at "/MarkLogic/redaction.xqy"; rdt:rule-validate(("pii-conceal", "obscure-loc")) (: Result: Assuming the rules in the "pii-conceal" and "obscure-loc" : collections are valid, the URIs of all the rule documents in these : collections. :)