<?xml version='1.0' encoding='ISO-8859-1'?>

<!-- This file makes part of an XSL Test Suite -->
<!-- Headers/footers test -->

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:rx="http://www.renderx.com/XSL/Extensions">

  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
           xmlns:dc="http://purl.org/dc/elements/1.1/"
           xmlns:dcterms="http://purl.org/dc/terms/"
           xmlns:db="http://www.oasis-open.org/docbook/xml/4.2/">
     <rdf:Description rdf:about="http://xep.xattic.com/testsuite/features/headers.xml">
        <dc:title>Side Regions - Borders, Background, Reference Orientation</dc:title>
        <dc:description>
          <db:para>
          Tests borders and backgrounds on side regions, with special
          emphasis on reference orientation.
          </db:para>
        </dc:description>
        <dc:date>2003-07-25</dc:date><dcterms:requires rdf:resource="http://xep.xattic.com/testsuite/features/macro.xsl"/>
    </rdf:Description>
  </rdf:RDF> 

  <fo:layout-master-set>
    <!-- Define a complete set of pagemasters -->
	
    <fo:simple-page-master master-name="odd-page">
      <fo:region-body    margin="1.2in"  margin-left="1.8in" padding="6pt"/>
      <fo:region-before  region-name="odd-header" extent="1.2in"
                         display-align="after"
                         precedence="true"
                         padding="6pt"
                         background-color="#FF8888"
                         background-image="url('{$image-path}upperside.jpg')"
                         background-repeat="repeat-x"
                         background-position="bottom center"
                         border-bottom="#CC0000 3pt solid"
                         reference-orientation="0"/>
      <fo:region-after   region-name="odd-footer" extent="1.2in"
                         display-align="after"
                         background-color="#88FF88"
                         background-image="url('{$image-path}upperside.jpg')"
                         background-repeat="repeat-x"
                         background-position="bottom center"
                         precedence="true"
                         padding="6pt"
                         border-top="#00CC00 3pt solid"
                         reference-orientation="180"/>
      <fo:region-start   region-name="odd-left" extent="1.8in"
                         display-align="after"
                         background-color="#8888FF"
                         background-image="url('{$image-path}upperside.jpg')"
                         background-repeat="repeat-y"
                         background-position="center center"
                         precedence="false"
                         padding="6pt"
                         border-right="#0000CC 3pt solid"
                         reference-orientation="90"/>
      <fo:region-end     region-name="odd-right" extent="1.2in"
                         display-align="after"
                         background-color="#FFFF88"
                         background-image="url('{$image-path}upperside.jpg')"
                         background-repeat="repeat-y"
                         background-position="center center"
                         padding="6pt"
                         border-left="#888800 3pt solid"
                         precedence="false"
                         reference-orientation="270"/>
    </fo:simple-page-master>
    
    <fo:simple-page-master master-name="even-page">
      <fo:region-body    margin-top="1.4in" margin-bottom="1.4in" margin-right="1.8in" margin-left="1.2in" padding="6pt"/>
      <fo:region-before  region-name="even-header" extent="1.4in"
                         display-align="before"
                         precedence="false"
                         padding="6pt"
                         border-bottom="#CC0000 3pt solid"
                         background-color="#FF8888"
                         background-image="url('{$image-path}upperside.jpg')"
                         background-repeat="repeat-y"
                         background-position="center center"
                         reference-orientation="-180"/>
      <fo:region-after   region-name="even-footer" extent="1.4in"
                         display-align="before"
                         background-color="#88FF88"
                         border-top="#00CC00 3pt solid"
                         background-image="url('{$image-path}upperside.jpg')"
                         background-repeat="repeat-y"
                         background-position="center center"
                         precedence="false"
                         padding="6pt"
                         reference-orientation="0"/>
      <fo:region-start   region-name="even-left" extent="1.2in"
                         display-align="before"
                         background-color="#FFFF88"
                         background-image="url('{$image-path}upperside.jpg')"
                         background-repeat="repeat-x"
                         background-position="top center"
                         precedence="true"
                         padding="6pt"
                         border-right="#888800 3pt solid"
                         reference-orientation="-90"/>
      <fo:region-end     region-name="even-right" extent="1.8in"
                         display-align="before"
                         background-color="#8888FF"
                         background-image="url('{$image-path}upperside.jpg')"
                         background-repeat="repeat-x"
                         background-position="top center"
                         padding="6pt"
                         border-left="#0000CC 3pt solid"
                         precedence="true"
                         reference-orientation="-270"/>
    </fo:simple-page-master>

    <fo:page-sequence-master master-name="duplex">
      <fo:repeatable-page-master-alternatives>
        <fo:conditional-page-master-reference master-reference="odd-page" odd-or-even="odd"/>
        <fo:conditional-page-master-reference master-reference="even-page" odd-or-even="even"/>
      </fo:repeatable-page-master-alternatives>
    </fo:page-sequence-master>

  </fo:layout-master-set>

  <fo:page-sequence master-reference="duplex" font="10pt Times">

    <fo:static-content flow-name="odd-header">
      <p text-align="center" font-weight="bold">Header of page <fo:page-number/></p>
      <p>
        Should be formatted as follows: light red background, thick red border
        at the bottom, a sequence of background images repeated horizontally.
        Background images and the text should be oriented normally
        (<code>reference-orientation="0"</code>), and aligned
        to the bottom (i.e. stuck to the central region). This region should
        extend to the corners (<code>precedence="true"</code>).
      </p>
    </fo:static-content>
    <fo:static-content flow-name="odd-footer">
      <p text-align="center" font-weight="bold">Footer of page <fo:page-number/></p>
      <p>
        Should be formatted as follows: light green background, thick green border
        at the top, a sequence of background images repeated horizontally.
        Background images and the text should be turned upside down
        (<code>reference-orientation="180"</code>), and aligned
        to the bottom (i.e. stuck to the central region). This region should
        extend to the corners (<code>precedence="true"</code>).
      </p>
    </fo:static-content>
    <fo:static-content flow-name="odd-left">
      <p text-align="center" font-weight="bold">Left sidebar of page <fo:page-number/></p>
      <p>
        Should be formatted as follows: light blue background, thick blue border
        at the bottom, a sequence of background images repeated vertically
        as a strip along the median of the region. 
        Background images and the text should be rotated by 90&#x00B0; clockwise
        (<code>reference-orientation="90"</code>), and aligned
        to the bottom (i.e. stuck to the central region). This region should
        not extend to the corners (<code>precedence="false"</code>).
      </p>
    </fo:static-content>
    <fo:static-content flow-name="odd-right">
      <p text-align="center" font-weight="bold">Right sidebar of page <fo:page-number/></p>
      <p>
        Should be formatted as follows: light yellow background, thick brown border
        at the top, a sequence of background images repeated vertically
        as a strip along the median of the region. 
        Background images and the text should be rotated by 90&#x00B0; counterclockwise
        (<code>reference-orientation="270"</code>), and aligned
        to the bottom (i.e. stuck to the central region). This region should
        not extend to the corners (<code>precedence="false"</code>).
      </p>
    </fo:static-content>

    <fo:static-content flow-name="even-header">
      <p text-align="center" font-weight="bold">Header of page <fo:page-number/></p>
      <p>
        Should be formatted as follows: light red background, thick red border
        at the bottom, a sequence of background images repeated vertically
        as a strip along the median of the region. 
        Background images and the text should be turned upside down
        (<code>reference-orientation="-180"</code>), and aligned
        to the top (i.e. stuck to the central region). This region should
        not extend to the corners (<code>precedence="false"</code>).
      </p>
    </fo:static-content>
    <fo:static-content flow-name="even-footer">
      <p text-align="center" font-weight="bold">Footer of page <fo:page-number/></p>
      <p>
        Should be formatted as follows: light green background, thick green border
        at the top, a sequence of background images repeated vertically
        as a strip along the median of the region. 
        Background images and the text should be oriented normally
        (<code>reference-orientation="0"</code>), and aligned
        to the top (i.e. stuck to the central region). This region should
        not extend to the corners (<code>precedence="false"</code>).
      </p>
    </fo:static-content>
    <fo:static-content flow-name="even-left">
      <p text-align="center" font-weight="bold">Left sidebar of page <fo:page-number/></p>
      <p>
        Should be formatted as follows: light yellow background, thick brown border
        at the bottom, a sequence of background images repeated horizontally.
        Background images and the text should be rotated by 90&#x00B0; clockwise
        (<code>reference-orientation="-90"</code>), and aligned
        to the top (i.e. stuck to the central region). This region should
        extend to the corners (<code>precedence="true"</code>).
      </p>
    </fo:static-content>
    <fo:static-content flow-name="even-right">
      <p text-align="center" font-weight="bold">Right sidebar of page <fo:page-number/></p>
      <p>
        Should be formatted as follows: light blue background, thick blue border
        at the top, a sequence of background images repeated horizontally.
        Background images and the text should be rotated by 90&#x00B0; counterclockwise
        (<code>reference-orientation="-270"</code>), and aligned
        to the top (i.e. stuck to the central region). This region should
        extend to the corners (<code>precedence="true"</code>).
      </p>
    </fo:static-content>

    <fo:flow flow-name="xsl-region-body" font="12pt Times">
      <title>Side Regions - Borders, Background, Reference Orientation</title>

      <repeat times="5">
        <p break-after="page">
          This document tests borders and backgrounds on side regions, with special
          emphasis on reference orientation.
        </p>
      </repeat>
      
    </fo:flow>

  </fo:page-sequence>

</fo:root>

