Creating an executable Stylesheet

PreviousNext

Once the XSLT processor is configured, you then need to create an executable version of your XSLT stylesheet or transform.

Creating a Stylesheet from an XML text file

This section deals with the normal case, that is, you are starting with an XML text file whose document element is xsl:stylesheet or xsl:transform.

Follow the following steps:

  1. Create an XM_XSLT_URI_SOURCE, passing it the SYSTEM id of your text file, as an absolute URI.
  2. Create an XM_XSLT_STYLESHEET_COMPILER, passing it the XM_XSLT_CONFIGURATION you previously created.
  3. Call prepare, passing the XM_XSLT_URI_SOURCE as the sole argument.
  4. Check for any errors from prepare by inspecting load_stylesheet_module_failed. If this is True, then load_stylesheet_module_error contains the reason why stylesheet compilation failed.

Creating a Stylesheet from an xml-stylesheet processing instruction

Not yet implemented.