W. Eliot Kimber
>> position= isn't an FO property (probably meant absolute-position=)
>> but in any case only block-container can be absolutely positioned.
>
>
> It's a shorthand (sect. 7.29.20).
Ah, I hadn't noticed this shorthand. But it is a shorthand that maps to
either absolute-position or relative-position. As absolute-position only
applies to block-container and relative-position explicitly does not apply
to block-container, this must mean that position maps to relative-position
when used on fo:block. > I can't find the restriction that
> only block-containers may be absolutely positioned in the spec, can
> you help me here?
The absolute-position property only applies to block-container. Section
7.5.1.
However, reading the description relative-position I'm not 100% clear what
it means for blocks. My initial reading is that it has no effect but I also
grant that the description is confusing at best.
Doing an experiment with XEP 3.77 and XSL Formatter 2.5 it appears that
relative-position has no effect on blocks. My test instance is below.
The first two blocks format the same with XSL Formatter. With XEP, the
second block is only 2in wide (the 1.0 spec is ambiguous about whether
width= is meaningful on fo:block). The second two blocks are formatted with
identical positioning by both formatters.
<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="mypage"
page-height="11in"
page-width="8.5in">
<fo:region-body
margin-left="20pt"
margin-right="20pt"
margin-top="20pt"
margin-bottom="20pt"
border-width="0.5pt"
border-color="blue"
border-style="solid"
/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="mypage">
<fo:flow flow-name="xsl-region-body"
font-family="sans-serif">
<fo:block
>Test of relative-position on blocks.</fo:block>
<fo:block left="10pt"
space-before="12pt"
background-color="silver"
border-width="1pt"
border-color="red"
border-style="solid"
>Block with left=10pt</fo:block>
<fo:block
left="1in"
width="2in"
space-before="12pt"
background-color="silver"
border-width="1pt"
border-color="red"
border-style="solid"
relative-position="relative"
>Block with width=2in left=1in and
relative-position="relative"</fo:block>
<fo:block
left="1in"
width="2in"
margin-left="0.5in"
space-before="12pt"
background-color="silver"
border-width="1pt"
border-color="red"
border-style="solid"
relative-position="relative"
>Block with width=2in left=1in margin-start="0.5in" and
relative-position="relative"</fo:block>
<fo:block
left="1in"
width="2in"
margin-left="0.5in"
space-before="12pt"
background-color="silver"
border-width="1pt"
border-color="red"
border-style="solid"
relative-position="static"
>Block with width=2in left=1in margin-start="0.5in" and
relative-position="static"</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
|