admin:database-validate-path-fields( $config as element(configuration), $database-id as xs:unsignedLong, $fields as element(db:field)* ) as empty-sequence()
For a given sequence of fields, this function validates all the paths on each field using admin:database-validate-field-paths call.
Parameters | |
---|---|
config | A configuration specification, typically as returned from one of the Admin module functions. |
database-id |
The ID of the database (for example,
xdmp:database("myDatabase") ).
|
fields | A sequence of fields that will be validated for paths. |
xquery version "1.0-ml"; import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; declare namespace db="http://marklogic.com/xdmp/database"; let $field-path := admin:database-field-path("/a/b/@c", 3.0) let $config := admin:get-configuration() let $dbid := xdmp:database("Documents") let $field-name := "myField" let $field := admin:database-path-field($field-name,$field-path) return admin:database-validate-path-fields( $config, $dbid, $field)