blob: 6edc20b72e464f81f5ff80bf4559dfaa0748c518 [file] [log] [blame]
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
<fo:layout-master-set>
<fo:simple-page-master master-name="one">
<fo:region-body margin-top="25pt" margin-bottom="25pt" margin-left="50pt" margin-right="50pt" />
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="one">
<fo:flow flow-name="xsl-region-body">
<fo:block text-align="center" font-size="16pt" font-weight="bold">
Block Containers
</fo:block>
<fo:block>
The fo:block-container object can be used to create an area with
a different writing mode or a different reference orientation.
The areas can be part of the flow or absolutely positioned.
</fo:block>
<fo:block>
This is a normal block container within the flow layout.
<fo:block-container>
<fo:block>
BC:A
</fo:block>
</fo:block-container>
</fo:block>
<fo:block>
This block container has a different reference orientation.
<fo:block-container reference-orientation="90" inline-progression-dimension="100pt">
<fo:block>
BC:B
</fo:block>
<fo:block>
The areas are stacked normally but the orientation of the
area is rotated 90 degrees anti-clockwise.
</fo:block>
<fo:block>
The blocks continue until exhausted as the layout
height of this container is fixed in the parent
block progression dimension. The clipping of the result
is determined by the overflow property. The block
progression dimension of this container is effectively
infinite.
</fo:block>
</fo:block-container>
</fo:block>
<fo:block>
This block container has a different reference orientation.
<fo:block-container reference-orientation="270" inline-progression-dimension="100pt">
<fo:block>
BC:B II
</fo:block>
<fo:block>
The areas are stacked normally but the orientation of the
area is rotated 90 degrees clockwise.
</fo:block>
<fo:block>
The blocks continue until exhausted as the layout
height of this container is fixed in the parent
block progression dimension. The clipping of the result
is determined by the overflow property.
</fo:block>
</fo:block-container>
</fo:block>
<fo:block>
This block container has a different reference orientation.
<fo:block-container reference-orientation="180" inline-progression-dimension="100pt">
<fo:block>
BC:B III
</fo:block>
<fo:block>
The areas are stacked normally but the orientation of the
area is rotated 180 degrees clockwise.
</fo:block>
<fo:block>
This block container behaves as part of the flow except
the contents are drawn rotated within the viewport by
180 degrees.
</fo:block>
</fo:block-container>
</fo:block>
<fo:block>
different writing mode
<fo:block-container writing-mode="rl">
<fo:block>
BC:C
</fo:block>
<fo:block>
The areas in this block are stacked according to the rl (tb)
writing mode.
</fo:block>
</fo:block-container>
</fo:block>
<fo:block>
The next block-container has an absolute position. It does
not affect the flow layout of other blocks.
<fo:block-container absolute-position="absolute"
left="20pt" top="400pt" right="220pt" bottom="550pt">
<fo:block>
BC:D
</fo:block>
<fo:block>
This is a normal block that is confined to the
block container.
</fo:block>
</fo:block-container>
</fo:block>
<fo:block>
The next block-container has an absolute position. It does
not affect the flow layout of other blocks. This time with
the reference-orientation set.
<fo:block-container reference-orientation="270" absolute-position="absolute"
left="400pt" top="370pt" right="500pt" bottom="270pt">
<fo:block>
BC:E
</fo:block>
<fo:block>
This is a normal block that is confined to the
block container.
</fo:block>
</fo:block-container>
</fo:block>
<fo:block break-after="page">
End of page.
</fo:block>
<fo:block>
The next block-container tests the clipping.
<fo:block-container reference-orientation="180" absolute-position="absolute"
right="100pt" bottom="550pt" left="200pt" top="700pt"
overflow="hidden">
<fo:block>
BC:F
</fo:block>
<fo:block>
This is a normal block that is confined to the
block container. It also has contents that are
larger than the block-container so that this text
will be clipped to the viewport.
</fo:block>
</fo:block-container>
</fo:block>
<fo:block>
The next block-container tests error-if-overflow.
<fo:block-container reference-orientation="90" absolute-position="absolute"
bottom="220pt" left="600pt" top="320pt" right="700pt"
overflow="error-if-overflow">
<fo:block>
BC:G
</fo:block>
<fo:block>
This is a normal block that is confined to the
block container. It also has contents that are
larger than the block-container so that this text
will be clipped to the viewport.
</fo:block>
</fo:block-container>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>