15.3.2.XPATH Query Options

<xp option> ::=
    __* | __http | __key   | __view NAME | __tag NAME | __quiet | __base_uri STRING |
    xmlns:NAME '=' STRING | xmlns '=' STRING |
    __lang STRING | __enc STRING | KEYWORD '=' KEYWORD

<option list> ::=  | <option list> '[' <option> [...] ']'

The option list may occur between the XPATH keyword and the start of the path, e.g.

XPATH [__key __view "cat"] /category

The effects of the options are as follows:

__http. Send the serialization of the result entities to the HTTP client. This may only be used inside a VSP page context.

__key. Select the key of the selected entities instead of the serialization text.

__*. Select all columns of the selected entity instead of its serialization text. This is only valid when __view is specified and the result set is homogeneous.

__view STRING. Specify that the query be interpreted in the context of the specified CREATE XML VIEW, directly accessing the tables. This is mandatory since the elements referenced can only be mapped to tables in the context of an XML view.

__quiet. Specify that the query should not signal non-fatal errors. This option is for cases when an incomplete result is anyway better than nothing. Typical example is search in the collection of documents where not all documents are valid.

__base_uri STRING. Specify the base URI that can be used to resolve relative URIs in calls of XPATH functions processXQuery() , processXSLT() and processXSLT() . This is similar to the effect of "declare base-uri" in XQuery.

xmlns:NAME '=' STRING. This declares a pair of namespace prefix and namespace URI for use in the query expression, e.g. xmlns:xs="http://www.w3.org/2001/XMLSchema" or xmlns:ora="http://schemas.oracle.com/xpath/extension"

xmlns '=' STRING. This declares the default namespace URI for use in the query expression, e.g. xmlns="http://www.example.com/my-schema". This namespace will become both default element namespace and default function namespace.

__lang STRING. This declares the language that is used for text search expressions. This is for internationalization purposes only. See subsection "Adding New Languages And Encodings Into Virtuoso" for more details.

__enc STRING. This declares encoding of strings that are used for text search expressions. This is for internationalization purposes only. See subsections "Encoding in XPath Expressions" and "Adding New Languages And Encodings Into Virtuoso" for more details.

KEYWORD '=' KEYWORD. This is useful only if the expression uses XPATH functions like document() or doc() or if the XPATH expression is an argument of xpath_contains or similar special SQL predicate. These are configuration options that XPATH processor provides to the XML parser when the processor should read a document. Section "Configuration Options of the DTD Validator" lists all supported options.