[Bug 12369] New: Reference-orientation and writing-mode on page-master and regions

[email protected] Wed, 23 Mar 2011 12:32:44 +0000
Newsgroups gmane.org.w3c.xsl-editors
Message-ID <[email protected]/Bugs/Public/>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=3D12369

           Summary: Reference-orientation and writing-mode on page-master
                    and regions
           Product: XSLFO
           Version: 1.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSL-FO
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]


There seems to be ambiguities in the way the reference-orientation and
writing-mode properties should be handled on side regions.

fo:simple-page-master is used to generate a page-viewport-area/
page-reference-area pair. The reference-orientation of the page-viewport-ar=
ea
is set to 0. In the description of Section 6.4.13, =93fo:simple-page-master=
=94,
there is the following:
=95 a note saying =93For example, if the writing-mode of the fo:simple-page=
-master
is =91lr-tb=92, then these regions correspond to the body of a document, the
header, the footer, the left sidebar, and the right sidebar.=94
=95 this sentence: =93The =91writing-mode=92 of the page is used to determi=
ne the
placement of the five regions on the master.=94

That seems to indicate that the value of the =93writing-mode=94 property se=
t on the
fo:simple-page-master is used to determine the placement of the regions.

=95 but further below there is this: =93The reference-orientation of the
page-reference-area and writing-mode of the page-viewport-area are determin=
ed
by the formatting object that generates the area (see 6.4.5 fo:page-sequenc=
e).=94

In Section 6.4.15, =93fo:region-before=94, there is this: =93This region sp=
ecifies a
viewport/reference pair that is located on the =91before=92 side of the
page-reference-area.=94

So, if the fo:simple-page-master has a =93reference-orientation=94 of 0 and=
 the
fo:page-sequence a =93reference-orientation=94 of 90, what prevails?

The existence of the from-page-master-region() function leaves to think that
the third point above should prevail. If that function is used, then the
reference-orientation and writing-mode properties set on fo:simple-page-mas=
ter
would be used, otherwise this is the value of those properties as specified=
 on
the fo:page-sequence element that would count. However, in Section 5.10.4 no
mention is being made of the fo:simple-page-master element. Only the regions
are mentioned.


If we assume that the from-page-master-region() function actually also appl=
ies
to fo:simple-page-master, and given the following XSL-FO document:

<?xml version=3D"1.0" standalone=3D"no"?>
<fo:root xmlns:fo=3D"http://www.w3.org/1999/xsl/format">

  <fo:layout-master-set>
    <fo:simple-page-master master-name=3D"page"
      page-width=3D"21cm" page-height=3D"29.7cm" reference-orientation=3D"9=
0">
      <fo:region-body margin-top=3D"15pt" reference-orientation=3D"90"/>
      <fo:region-before extent=3D"10pt"/>
    </fo:simple-page-master>
  </fo:layout-master-set>

  <fo:page-sequence master-reference=3D"page"
    reference-orientation=3D"from-page-master-region()">
    <fo:static-content flow-name=3D"xsl-region-before" font-size=3D"8pt">
      <fo:block>xsl-region-before</fo:block>
    </fo:static-content>
    <fo:flow flow-name=3D"xsl-region-body">
      <fo:block>lorem ipsum dolor sit amet, consectetur adipiscing elit.
        vestibulum arcu felis, gravida vitae laoreet in, molestie nec
        libero. mauris non enim diam. pellentesque nisl diam, aliquet
        nec euismod vitae, convallis nec massa. mauris gravida arcu ac
        erat euismod molestie. maecenas eget neque in sem aliquam
        viverra. vivamus dictum lobortis scelerisque.</fo:block>
    </fo:flow>
  </fo:page-sequence>

</fo:root>

Because the from-page-master-region() function is used, the
=93reference-orientation=94 property specified on the fo:simple-page-master=
 and the
regions would be used to determine their orientations.

So the content-rectangle of the page-reference-area would be like this:

    ___________________________
    |          end            |
    |                         |
    |                         |
    |                         |
    |                         |
    |                         |
    |before                   |after
    |                         |
    |                         |
    |                         |
    |                         |
    |                         |
    |                         |
    |_________________________|
              start

While the content-rectangle of the region-viewport-area for the region-befo=
re
is supposed to be like this:

     after
     ____
     |  |
     |  |
     |  |
     |  |
     |  |
  end|  |start
     |  |
     |  |
     |  |
     |  |
     |  |
     |__|
    before

which seems to be inconsistent with the description of fo:region-before:
    =93The before-edge of the content-rectangle of this region-viewport-are=
a is
positioned coincident with the before-edge of the content-rectangle of the
page-reference-area generated using the parent fo:simple-page-master. The
block-progression-dimension of the region-viewport-area is determined by the
extent trait on the fo:region-before formatting object.=94

The inconsistency could be resolved by replacing content-rectangle with
border-rectangle in the excerpt above. Because, as explained in Section 4.2=
.3,
=93Geometric Definitions=94, the definition of the before/after/start/end-e=
dges of
the content-rectangle of an area uses the inline/block-progression-directio=
n of
that area; Whereas the border/padding/allocation-rectangles use the directi=
ons
of the parent area.


Thanks,
Vincent

--=20
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=3Demail
------- You are receiving this mail because: -------
You are the QA contact for the bug.=