Package restxsl :: Module transform
[frames | no frames]

Module restxsl.transform

Transforms reStructuredText files into XML files (XHTML, usually) using XSL stylesheets.
Exceptions
InvalidXpathExpression Exception raised when an invalid XPATH expression is given to the xpath role.
RestException Raised when an error is found while parsing the reST document.

Function Summary
list of (filename, XML text) tuples restxsl(restPath, smartPunctuation, extModule, extModuleCookie, encoding, xslBasePath, xslPath, xslParams)
Transform reStructuredText to XML using an XSL stylesheet.

Function Details

restxsl(restPath, smartPunctuation=False, extModule=None, extModuleCookie=None, encoding='ASCII', xslBasePath=None, xslPath=None, xslParams=None)

Transform reStructuredText to XML using an XSL stylesheet.
Parameters:
restPath - The path to the reStructuredText file to transform.
           (type=str)
smartPunctuation - True to convert quotes, dashes, and ellipses to their smart (and curly) Unicode counterparts; False to leave the punctuation alone.
           (type=bool)
extModule - The Python module that contains the extension functions used by the pyxslt directive.
           (type=module)
extModuleCookie - The Python object (or list, string, dict, etc.) that will be passed to the methods called by the pyxslt directive. This can be used to pass state from the code that calls the restxsl method to the code in the extension module.
           (type=object)
encoding - The character encoding to use when outputting the final XML document. Values such as UTF-8, ISO-8859-1, ASCII, etc. are appropriate.
           (type=str)
xslBasePath - The path to prepend to absolute stylesheet references.
           (type=str)
xslPath - The path to the XSL file that should be used to transform the reStructuredText document, or None to use the stylesheet specified in the document's (:xsl-template: field).
           (type=str containing the path to an XSL stylesheet.)
xslParams - Parameters to pass to the XSL stylesheet.
           (type=dict)
Returns:
A list of (filename, XML text) tuples, one for each result document. There will normally be only a single document, but in the case of a multi-instance call to the pyxslt directive, there will be multiple result documents. Note that the filename portion of the tuple will always be None in the single-document case.
           (type=list of (filename, XML text) tuples)

Generated by Epydoc 2.1 on Wed Jul 12 11:20:41 2006 http://epydoc.sf.net