Next / Previous / Contents / Shipman's homepage

7.7. fosoxtest: buildFlow()

This function builds the flow element and fills it with some sample text.

fosoxtest
# - - -   b u i l d F l o w

def buildFlow(s):
    '''Generate some sample content.

      [ s is a sox.Sox instance ->
          s  +:=  a flow element containing block elements with
                  sample text ]
    '''
    sampleText = ("Now is the time for all good organisms to come to "
                  "the aid of their planet! ")
    flow = f.flow(s, "xsl-region-body")
    for i in range(17):
        s.leaf("block", BODY_FONT, f.dash(spaceBefore="10pt"),
               sampleText*17)
    flow.end()