Back to index

moin  1.9.0~rc2
Classes | Functions | Variables
MoinMoin.parser.text_docbook Namespace Reference

Classes

class  Parser

Functions

def _compile_xsl
def _splitResult

Variables

list Dependencies = []

Function Documentation

def MoinMoin.parser.text_docbook._compile_xsl (   XSLT_FILE,
  XSLT_COMPILED_FILE 
) [private]
    compiling docbook stylesheet

    reference: http://155.210.85.193:8010/ccia/nodes/2005-03-18/compileXslt?xslt=/akara/akara.xslt

Definition at line 156 of file text_docbook.py.

00156 
00157 def _compile_xsl(XSLT_FILE, XSLT_COMPILED_FILE):
00158     """
00159         compiling docbook stylesheet
00160 
00161         reference: http://155.210.85.193:8010/ccia/nodes/2005-03-18/compileXslt?xslt=/akara/akara.xslt
00162     """
00163     from Ft.Xml.Xslt.Processor import Processor
00164     from Ft.Xml.Xslt import Stylesheet
00165     from Ft.Xml import InputSource
00166     from Ft.Lib import Uri
00167 
00168     # New docbook processor
00169     db_processor = Processor()
00170 
00171     # Docbook Stylesheet
00172     my_sheet_uri = Uri.OsPathToUri(XSLT_FILE, 1)
00173     sty_isrc = InputSource.DefaultFactory.fromUri(my_sheet_uri)
00174 
00175     # Append Stylesheet
00176     db_processor.appendStylesheet(sty_isrc)
00177 
00178     # Pickled stylesheet will be self.abs_db_compiled_xsl file
00179     db_root = db_processor.stylesheet.root
00180     fw = file(XSLT_COMPILED_FILE, 'wb')
00181     cPickle.dump(db_root, fw) # , protocol=2)
00182     fw.close()
00183 

Here is the caller graph for this function:

def MoinMoin.parser.text_docbook._splitResult (   iterator,
  result 
) [private]

Definition at line 184 of file text_docbook.py.

00184 
00185 def _splitResult(iterator, result):
00186     startpos = 0
00187     splitResult = []
00188 
00189     for f in iterator:
00190         start, end = f.span()
00191         splitResult.append(result[startpos:start])
00192         splitResult.append(result[start:end])
00193         startpos = end
00194     splitResult.append(result[startpos:])
00195 
00196     return splitResult
00197 

Here is the caller graph for this function:


Variable Documentation

Definition at line 41 of file text_docbook.py.