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.Expression
object from the providedbeta.xquery.ExpressionProvider
andbeta.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.Expression
is None and thexml.ErrorLog
contains 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.Sequence
can be accessed via thebeta.xpath.ResultList.main_value
property. Note that the actual value in thebeta.xpath.Sequence
will vary depending on thebeta.xpath.DeliveryFormat
specified in thebeta.xquery.RuntimeOptions
. In case of a runtime error the returnedbeta.xpath.ResultList
is None and thexml.ErrorLog
contains 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__