xslt.Stylesheet¶
The xslt.Stylesheet class represents a valid, compiled xslt stylesheet.
It can be instantiated with the xslt.Stylesheet.compile() classmethod.
The same xslt.Stylesheet can be used for multiple executions with different xslt.RuntimeOptions.
There is also a utility function xslt.compile() that can be used to create an xslt.Stylesheet.
Base class: xquery.xpath.Executable -> xquery.xpath.Module
- class xslt.Stylesheet¶
Class methods¶
- classmethod xslt.Stylesheet.compile(type cls, stylesheet, CompileOptions options)¶
Compiles a new
xslt.Stylesheetfrom the providedxslt.StylesheetProviderandxslt.CompileOptions. This involves loading of the xslt from thexslt.StylesheetProvider, validating and preparing for execution. In case of an xml or a static error, the returnedxslt.Stylesheetis None and thexml.ErrorLogcontains the error(s).Returns: (xslt.Styelesheet,
xml.ErrorLog).
Attributes¶
- xquery.xpath.Module.location
- xquery.xpath.Executable.referenced_modules
- xquery.xpath.Module.schema
- xquery.xpath.Module.strip_input_type_annotations
- xquery.xpath.Module.whitespace_handler
Methods¶
- xslt.Stylesheet.execute(RuntimeOptions options)¶
Execute the compiled
xslt.Stylesheetwith the providedxslt.RuntimeOptions. The value of the principal result can be accessed via thexpath.ResultList.main_valueproperty. Note that the actual value in thexpath.Sequencewill vary depending on the xpath.DeliveryFormat specified in thexslt.RuntimeOptions. In case of a runtime error the returnedxpath.ResultListis None and thexml.ErrorLogcontains the error.Returns: (xslt.ResultList,
xml.ErrorLog)
- xquery.xpath.Module.load_xml_document(unicode uri, f)
Special methods¶
__eq__, __ge__, __gt__, __le__, __lt__, __ne__