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.Stylesheetfrom the providedbeta.xslt.StylesheetProviderandbeta.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.Stylesheetis None and thexml.ErrorLogcontains 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.Stylesheetwith the providedbeta.xslt.RuntimeOptions. The value of the principal result can 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.xslt.RuntimeOptions. In case of a runtime error the returnedbeta.xpath.ResultListis None and thexml.ErrorLogcontains 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__