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)
|