Next / Previous / Contents / TCC Help System / NM Tech homepage

36.6. CensusRowLabel._foSimple(): Render a simple name as XSL-FO

This method generates a block element containing the English name, left-aligned. For the logic that formats the English name, see Section 36.8, “CensusRowLabel._foBirdName(). If the database has a six-letter code that isn't in the current taxonomy, the method will fail, raising a ScriptError.
# - - -   C e n s u s R o w L a b e l . _ f o S i m p l e

    def _foSimple(self, s):
        '''Render a single bird name.

          [ s is a sox.Sox instance ->
              if self.birdId is defined in self.birdId.txny ->
                s  +:=  a block element containing the English name
                        for self.birdId.abbr as XSL-FO
              else -> raise ScriptError ]
        #-- 1
        block = s.start("block", FO_ALIGN_LEFT)
        self._foBirdName(s, self.birdId.abbr)