Python LMF library
 All Classes Namespaces Files Functions Variables
Functions
pylmflib.pylmflib.output.xml_lmf Namespace Reference

Functions

def xml_lmf_write
 Write an XML LMF file. More...
 
def build_sub_elements
 Create XML sub-elements to an existing XML element by parsing an LMF object instance. More...
 
def add_link
 Functions to process XML/XHTML layout. More...
 
def handle_reserved
 
def handle_fv
 
def handle_fn
 
def handle_font
 
def handle_pinyin
 
def handle_caps
 
def handle_tones
 

Function Documentation

def pylmflib.pylmflib.output.xml_lmf.add_link (   object,
  element 
)

Functions to process XML/XHTML layout.

Insert an hyperlink <a href=xxx>xxx<a/> in XML.

Definition at line 69 of file xml_lmf.py.

def pylmflib.pylmflib.output.xml_lmf.build_sub_elements (   object,
  element 
)

Create XML sub-elements to an existing XML element by parsing an LMF object instance.

Parameters
objectAn LMF object instance.
elementXML element for which sub-elements have to be created according to LMF object attributes.

Definition at line 22 of file xml_lmf.py.

def pylmflib.pylmflib.output.xml_lmf.handle_caps (   element)
Handle small caps.
Replace '°xxx' by '<span class="sc">xxx</span>'.

Definition at line 239 of file xml_lmf.py.

def pylmflib.pylmflib.output.xml_lmf.handle_fn (   element)
Replace 'fn:xxx' and '|fn{xxx}' by '<span class="national">xxx</span>'.

Definition at line 134 of file xml_lmf.py.

def pylmflib.pylmflib.output.xml_lmf.handle_font (   element)
Replace '{xxx}' by '<span class="ipa">xxx</span>'.

Definition at line 171 of file xml_lmf.py.

def pylmflib.pylmflib.output.xml_lmf.handle_fv (   element)
Replace 'fv:xxx' and '|fv{xxx}' by '<span class="vernacular">xxx</span>'.

Definition at line 95 of file xml_lmf.py.

def pylmflib.pylmflib.output.xml_lmf.handle_pinyin (   element)
Replace '@xxx' by '<span class="pinyin">xxx</span>'.

Definition at line 205 of file xml_lmf.py.

def pylmflib.pylmflib.output.xml_lmf.handle_reserved (   element)
Handle reserved characters.

Definition at line 90 of file xml_lmf.py.

def pylmflib.pylmflib.output.xml_lmf.handle_tones (   element)
Replace tones subscripts by '<sub>xxx</sub>'.

Definition at line 274 of file xml_lmf.py.

def pylmflib.pylmflib.output.xml_lmf.xml_lmf_write (   object,
  filename 
)

Write an XML LMF file.

Parameters
objectThe LMF instance to write as XML.
filenameThe name of the XML LMF file to write with full path, for instance 'user/output.xml'.

Definition at line 10 of file xml_lmf.py.