beta.xslt.Stylesheet
¶
The beta.xslt.Stylesheet
class represents a valid, compiled xslt stylesheet.
It can be instantiated with the beta.xslt.Stylesheet.compile()
classmethod.
The same beta.xslt.Stylesheet
can be used for multiple executions with different beta.xslt.RuntimeOptions
.
There is also a utility function beta.xslt.compile()
that can be used to create an beta.xslt.Stylesheet
.
Base class: beta.xslt.xpath.Executable
-> beta.xslt.xpath.Module
-
class
beta.xslt.
Stylesheet
¶
Class methods¶
-
classmethod
beta.xslt.Stylesheet.
compile
(type cls, stylesheet, CompileOptions options)¶ Compiles a new
beta.xslt.Stylesheet
from the providedbeta.xslt.StylesheetProvider
andbeta.xslt.CompileOptions
. This involves loading of the xslt from thebeta.xslt.StylesheetProvider
, validating and preparing for execution. In case of an xml or a static error, the returnedbeta.xslt.Stylesheet
is None and thexml.ErrorLog
contains the error(s).Returns: (xslt.Styelesheet,
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.xslt.Stylesheet.
execute
(RuntimeOptions options)¶ Execute the compiled
beta.xslt.Stylesheet
with the providedbeta.xslt.RuntimeOptions
. The value of the principal result 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.xslt.RuntimeOptions
. In case of a runtime error the returnedbeta.xpath.ResultList
is None and thexml.ErrorLog
contains the error.Returns: (xslt.ResultList,
xml.ErrorLog
)
-
beta.xslt.xpath.Module.
load_xml_document
(unicode uri, f)
Special methods¶
__eq__, __ge__, __gt__, __le__, __lt__, __ne__