As with the HTML rendering, the first step is to break the
logical row into one or more physical rows; see Section 29.4, “
Row.fold(): Fold a logical row into
# - - - R o w . f o def fo(self, s, maxPhysCols): '''Render this logical row as XSL-FO. ''' #-- 1 # [ rowList := a list of PhysRow instances representing self # folded into one or more physical rows each with no # more than (maxPhysCols) detail columns # nRows := length of that list ] rowList = self.fold(maxPhysCols) nRows = len(rowList)
For the XSL-FO rendering logic, see Section 45.5, “
PhysRow.fo(): Render as XSL-FO”, which needs to know the physical row number within the
group so that it can implement row grouping.
#-- 2 # [ s +:= the rows of rowList rendered as XSL-FO with row # grouping according to row position ] for rowx, physRow in enumerate(rowList): #-- 2 body # [ s +:= physRow rendered as XSL-FO with row grouping # according to rowx ] physRow.fo(s, rowx, nRows)