For a discussion of how this method generates both inline and block content, see Section 4.10, “XHTML rendering of form data”.
# - - - M o n t h C e l l . _ l o c G r o u p
def __locGroup ( self, parent, locGroup ):
'''Render a LocGroup instance in XHTML.
[ (parent is an et.Element) and
(locGroup is a birdnotes.LocGroup instance) ->
parent +:= XHTML rendering of locGroup ]
'''
The tccpage2.addTextMixed() places the
location name as inline text. For documentation for tccpage2, see Section 3, “Overview of the internals”.
#-- 1 --
# [ if locGroup.loc is not None ->
# parent +:= locGroup.loc.name
# else -> I ]
if locGroup.loc is not None:
tccpage2.addTextMixed ( parent, '@%s' % locGroup.loc.name )
#-- 2 --
# [ if locGroup.gps is not None ->
# parent +:= (' GPS: ')+(locGroup.gps)
# else -> I ]
if locGroup.gps is not None:
tccpage2.addTextMixed ( parent,
' GPS: %s' % locGroup.gps )
If there is loc-detail content, it is a
Narrative instance; see Section 23.16, “MonthCell.__narrative(): Render a
Narrative instance”.
#-- 3 --
# [ if locGroup.locDetail is not None ->
# parent +:= locGroup.locDetail wrapped in a div
# else -> I ]
if locGroup.locDetail is not None:
self.__narrative ( parent, locGroup.locDetail )