
pkg:valid( $pkgname as xs:string ) as xs:boolean
[DEPRECATED: use cma:generate-config and
cma:apply-config instead.]
true if
the package is valid and false if the package is not valid.
| Parameters | |
|---|---|
| pkgname | The name of the package to check for validity. |
This function returns true if the package is valid and false otherwise.
Use pkg:errors to view a list of errors for an invalid
package.
A package may be invalid for many reasons, including a violation of the package schema (Config/package.xsd), fields with erroneous values, or duplicate settings.
xquery version "1.0-ml";
import module namespace pkg = "http://marklogic.com/manage/package"
at "/MarkLogic/manage/package/package.xqy";
pkg:valid("mypackage)
=> Returns 'true' if "mypackage" is valid. Otherwise returns 'false.'
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.