Loading TOC...

MarkLogic Server 11.0 Product Documentation
rest:check-options

rest:check-options(
   $options as element(rest:options)
) as element(rest:report)?

Summary

This function validates the specified options node. Validation includes both schema validation and some additional rule-based validation. An empty sequence indicates valid options and any problems are reported via rest:report elements.

Parameters
options The options node to be validated.

Example

  xquery version "1.0-ml"; 
 
  import module namespace rest="http://marklogic.com/appservices/rest"
      at "/MarkLogic/appservices/utils/rest.xqy";

      try {
         rest:check-options(
           <options xmlns="http://marklogic.com/appservices/rest">
              <request uri="^/(.+)$" endpoint="/endpoint.xqy">
                <uri-param name="play">$1.xml</uri-param>
              </request>
           </options>)
    } catch ($e) {
       rest:report-error($e)
    }
    

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