Package translate :: Package storage :: Module lisa
[hide private]
[frames] | no frames]

Module lisa

source code

Parent class for LISA standards (TMX, TBX, XLIFF)

Classes [hide private]
  LISAunit
A single unit in the file.
  LISAfile
A class representing a file store for one of the LISA file formats.
Functions [hide private]
 
getText(node)
joins together the text from all the text nodes in the nodelist and their children
source code
 
_findAllMatches(text, re_obj)
generate match objects for all @re_obj matches in @text.
source code
 
_getPhMatches(text)
return list of regexp matchobjects for with all place holders in the @text
source code
 
getXMLlang(node)
Sets the xml:lang attribute on node
source code
 
setXMLlang(node, lang)
Sets the xml:lang attribute on node
source code
 
setXMLspace(node, value)
Sets the xml:space attribute on node
source code
 
namespaced(namespace, name)
Returns name in Clark notation within the given namespace.
source code
Variables [hide private]
  placeholders = ['(%[diouxXeEfFgGcrs])', '(\\\\+.?)', '(%[0-9]$...
  re_placeholders = [re.compile(r'(%[diouxXeEfFgGcrs])'), re.com...
  XML_NS = 'http://www.w3.org/XML/1998/namespace'
  ph = '(<.+?>)'
Function Details [hide private]

namespaced(namespace, name)

source code 
Returns name in Clark notation within the given namespace.

For example namespaced("source") in an XLIFF document might return
    {urn:oasis:names:tc:xliff:document:1.1}source
This is needed throughout lxml.


Variables Details [hide private]

placeholders

Value:
['(%[diouxXeEfFgGcrs])',
 '(\\\\+.?)',
 '(%[0-9]$lx)',
 '(%[0-9]\\$[a-z])',
 '(<.+?>)']

re_placeholders

Value:
[re.compile(r'(%[diouxXeEfFgGcrs])'),
 re.compile(r'(\\+.?)'),
 re.compile(r'(%[0-9]$lx)'),
 re.compile(r'(%[0-9]\$[a-z])'),
 re.compile(r'(<.+?>)')]