Loading TOC...

pkg:exists

pkg:exists(
   $pkgname as xs:string
) as xs:boolean

Summary

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

Checks to see if the named package exists. Returns true if the package exists and false if the package does not exist.

Parameters
pkgname The package to check.

Required Privileges

http://marklogic.com/xdmp/privileges/manage

Example

xquery version "1.0-ml";
import module namespace pkg = "http://marklogic.com/manage/package" 
   at "/MarkLogic/manage/package/package.xqy";

pkg:exists("mypackage")
  
  => Returns 'true' if "mypackage" exists.  Otherwise returns 'false.'
  

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