plugin:asset-exists( $pid as xs:string, $scope as xs:string, $asset-path as xs:string ) as xs:boolean
Returns true if the named asset exists, otherwise returns false.
xquery version "1.0-ml"; import module namespace plugin = "http://marklogic.com/extension/plugin" at "/MarkLogic/plugin/plugin.xqy"; plugin:asset-exists("collector-test", "marklogic.appservices", "picture.gif") (: Returns true if the asset, 'picture.gif,' used by the collect-test plugin is located in the Extensions database. :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.