Loading TOC...


   $pkgname as xs:string
) as xs:boolean


[DEPRECATED: use cma:generate-config and cma:apply-config instead.]

Test a package for consistency. Returns true if the package is valid and false if the package is not valid.

pkgname The name of the package to check for validity.

Usage Notes

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";

  => Returns 'true' if "mypackage" is valid.  Otherwise returns 'false.' 

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.