qbe:validate( $example as item() ) as element()
This function validates a query by example.
Parameters | |
---|---|
$example | A query by example for matching XML documents. |
The return value is one of the following:
valid-query
element if the query is valid.
invalid-query
element reporting the detected issues
if the query is invalid.
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> )
qbe:validate() as
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.