rdt.ruleValidate( rule-collection as String[] ) as Sequence
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.
var rdt = require('/MarkLogic/redaction.xqy') rdt.ruleValidate(["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.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.