Loading TOC...

MarkLogic Server 11.0 Product Documentation
qbe:validate

qbe:validate(
   $example as item()
) as element()

Summary

This function validates a query by example.

Parameters
$example A query by example for matching XML documents.

Usage Notes

The return value is one of the following:

Example

xquery version "1.0-ml";

import module namespace qbe = "http://marklogic.com/appservices/querybyexample"
     at "/MarkLogic/appservices/search/qbe.xqy";

qbe:validate(
  <qbe:query>
    <title><qbe:word>sawyer</qbe:word></title>
    <qbe:and>
      <price><qbe:ge>8.00</qbe:ge></price>
      <price><qbe:lt>10.00</qbe:lt></price>
    </qbe:and>
  </qbe:query>
  )
  

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