beta.xquery.Expression¶
The beta.xquery.Expression class represents a valid, compiled xquery expression.
It can be instantiated with the beta.xquery.Expression.compile() classmethod.
The same beta.xquery.Expression can be used for multiple executions with different beta.xquery.RuntimeOptions.
There is also a utility function beta.xquery.compile() that can be used to create an beta.xquery.Expression.
Base class: beta.xslt.xpath.Executable -> beta.xslt.xpath.Module
-
class
beta.xquery.Expression¶
Class methods¶
-
classmethod
beta.xquery.Expression.compile(type cls, expression, CompileOptions options)¶ Compiles a new
beta.xquery.Expressionobject from the providedbeta.xquery.ExpressionProviderandbeta.xquery.CompileOptions. This involves syntax checking, building of AST, initializing of static context components and static-analysis. In case of a syntax or a static error, thebeta.xquery.Expressionis None and thexml.ErrorLogcontains the error(s).Returns: (
beta.xquery.Expression,xml.ErrorLog)
Attributes¶
-
beta.xslt.xpath.Module.location
-
beta.xslt.xpath.Executable.referenced_modules
-
beta.xslt.xpath.Module.schema
-
beta.xslt.xpath.Module.strip_input_type_annotations
-
beta.xslt.xpath.Module.whitespace_handler
Methods¶
-
beta.xquery.Expression.execute(RuntimeOptions options)¶ Execute the compiled xquery expression with the provided
beta.xquery.RuntimeOptions. The main resultbeta.xpath.Sequencecan be accessed via thebeta.xpath.ResultList.main_valueproperty. Note that the actual value in thebeta.xpath.Sequencewill vary depending on thebeta.xpath.DeliveryFormatspecified in thebeta.xquery.RuntimeOptions. In case of a runtime error the returnedbeta.xpath.ResultListis None and thexml.ErrorLogcontains the error.Returns: (xquery.ResultList,
xml.ErrorLog)
-
beta.xslt.xpath.Module.load_xml_document(unicode uri, f)
Special methods¶
__eq__, __ge__, __gt__, __le__, __lt__, __ne__