Module expandais
[hide private]
[frames] | no frames]

Module expandais

source code

Expand structs in ais xml to include-struct elements while applying name mangling


Requires:

Author: Kurt Schwehr

Version: 4820

Copyright: 2006

Since: 2006-Sep-26

Status: under development

Organization: CCOM

License: Restricted while in development to NOAA and USCG.

Functions [hide private]
  getPos(parent, child)
Return the position number of the child node.
  expandAis(inET, verbose=False)
Replace each include-struct with the structure.
  nukeStructs(inET, verbose=False)
Replace each include-struct with the structure.

Variables [hide private]
  __date__ = '2006-09-28'
Date of last svn commit
  newET = nukeStructs(newET, options.verbose)

Function Details [hide private]

getPos(parent, child)

source code 
Return the position number of the child node. It seems like this really should be a part of the element tree interface. Perhaps I overlooked it.

expandAis(inET, verbose=False)

source code 
Replace each include-struct with the structure. This code is not pretty, but it seems to work. The include-struct name is prepended to each field name within the struct. The include-struct description is also added to before the fields description.
Parameters:
  • inET - lxml element tree to expand
Returns:
lxml element tree with expanded structures

nukeStructs(inET, verbose=False)

source code 
Replace each include-struct with the structure. This code is not pretty, but it seems to work. The include-struct name is prepended to each field name within the struct. The include-struct description is also added to before the fields description.
Parameters:
  • inET - lxml element tree to expand
Returns:
lxml element tree with expanded structures

Variables Details [hide private]

__date__

Date of last svn commit
Value:
'2006-09-28'                                                           
      

newET

None
Value:
nukeStructs(newET, options.verbose)