Package ais :: 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

Bug: WHY IS THE IMO message screwing up the day field?

License: GPL v2

Date: 2006-09-28

Functions [hide private]
 
getPos(parent, child)
Return the position number of the child node.
source code
 
expandAis(inET, verbose=False)
Replace each include-struct with the structure.
source code
 
nukeStructs(inET, verbose=False)
Replace each include-struct with the structure.
source code
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