admin:database-ruleset( $location as xs:string ) as element(db:default-ruleset)
The ruleset element (db:default-ruleset) created to be used for inference on a database. One or more rulesets can be used for inference. Rulesets are stored in the Schemas database. By default, no ruleset is configured.
Parameters | |
---|---|
location | The URI (location) of the ruleset. |
xquery version "1.0-ml"; import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; let $config := admin:get-configuration() let $dbid := admin:database-get-id($config, "myDatabase") let $rules := admin:database-ruleset(("subClassOf.rules", "sameAs.rules")) let $c := admin:database-add-default-ruleset($config, $dbid, $rules) return admin:database-get-default-rulesets($c,$dbid) (: Specifies the ruleset or rulesets to be used. :)