This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 12369 - Reference-orientation and writing-mode on page-master and regions
Summary: Reference-orientation and writing-mode on page-master and regions
Status: NEW
Alias: None
Product: XSLFO
Classification: Unclassified
Component: XSL-FO (show other bugs)
Version: 1.1
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Tony Graham
QA Contact: Mailing list for comments on XSL (XSl-FO)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-23 12:32 UTC by Vincent Hennebert
Modified: 2011-03-23 12:32 UTC (History)
0 users

See Also:


Attachments

Description Vincent Hennebert 2011-03-23 12:32:42 UTC
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-area is set to 0. In the description of Section 6.4.13, fo:simple-page-master, there is the following:
 a note saying For example, if the writing-mode of the fo:simple-page-master is lr-tb, then these regions correspond to the body of a document, the header, the footer, the left sidebar, and the right sidebar.
 this sentence: The writing-mode of the page is used to determine the placement of the five regions on the master.

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

 but further below there is this: The reference-orientation of the page-reference-area and writing-mode of the page-viewport-area are determined by the formatting object that generates the area (see 6.4.5 fo:page-sequence).

In Section 6.4.15, fo:region-before, there is this: This region specifies a viewport/reference pair that is located on the before side of the page-reference-area.

So, if the fo:simple-page-master has a reference-orientation of 0 and the fo:page-sequence a reference-orientation 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-master 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 applies to fo:simple-page-master, and given the following XSL-FO document:

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

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

  <fo:page-sequence master-reference="page"
    reference-orientation="from-page-master-region()">
    <fo:static-content flow-name="xsl-region-before" font-size="8pt">
      <fo:block>xsl-region-before</fo:block>
    </fo:static-content>
    <fo:flow flow-name="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 reference-orientation 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-before is supposed to be like this:

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

which seems to be inconsistent with the description of fo:region-before:
    The before-edge of the content-rectangle of this region-viewport-area 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.

The inconsistency could be resolved by replacing content-rectangle with border-rectangle in the excerpt above. Because, as explained in Section 4.2.3, Geometric Definitions, the definition of the before/after/start/end-edges of the content-rectangle of an area uses the inline/block-progression-direction of that area; Whereas the border/padding/allocation-rectangles use the directions of the parent area.


Thanks,
Vincent