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 provided beta.xslt.StylesheetProvider and beta.xslt.CompileOptions. This involves loading of the xslt from the beta.xslt.StylesheetProvider, validating and preparing for execution. In case of an xml or a static error, the returned beta.xslt.Stylesheet is None and the xml.ErrorLog contains the error(s).

Returns: (xslt.Styelesheet, xml.ErrorLog).




beta.xslt.Stylesheet.execute(RuntimeOptions options)

Execute the compiled beta.xslt.Stylesheet with the provided beta.xslt.RuntimeOptions. The value of the principal result can be accessed via the beta.xpath.ResultList.main_value property. Note that the actual value in the beta.xpath.Sequence will vary depending on the beta.xpath.DeliveryFormat specified in the beta.xslt.RuntimeOptions. In case of a runtime error the returned beta.xpath.ResultList is None and the xml.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__