<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- $Id: markers_7.xml 627324 2008-02-13 09:35:01Z maxberger $ -->
<testcase>
  <info>
    <p>
      This test checks if all FOs at least add markers (not that they do it right).
    </p>
    <p>
      TODO: Add checks for the rest of the marker-enabled FOs (table-caption etc.)
    </p>
  </info>
  <fo>
    <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="normal" page-width="5in" page-height="5in">
          <fo:region-body margin="0.5in 0"/>
          <fo:region-before extent="0.5in"/>
          <fo:region-after extent="0.5in"/>
        </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="normal" white-space-collapse="true">
        <fo:static-content flow-name="xsl-region-before">
          <fo:block background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="first-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:static-content flow-name="xsl-region-after">
          <fo:block text-align="end" background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="last-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
          <fo:marker marker-class-name="test">fo:flow</fo:marker>
          <fo:block>blah</fo:block>
        </fo:flow>
      </fo:page-sequence>
      <fo:page-sequence master-reference="normal" white-space-collapse="true">
        <fo:static-content flow-name="xsl-region-before">
          <fo:block background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="first-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:static-content flow-name="xsl-region-after">
          <fo:block text-align="end" background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="last-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
          <fo:block>
            <fo:marker marker-class-name="test">fo:block</fo:marker>blah</fo:block>
        </fo:flow>
      </fo:page-sequence>
      <fo:page-sequence master-reference="normal" white-space-collapse="true">
        <fo:static-content flow-name="xsl-region-before">
          <fo:block background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="first-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:static-content flow-name="xsl-region-after">
          <fo:block text-align="end" background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="last-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
          <fo:block-container>
            <fo:marker marker-class-name="test">fo:block-container</fo:marker>
            <fo:block>blah</fo:block>
          </fo:block-container>
        </fo:flow>
      </fo:page-sequence>
      <fo:page-sequence master-reference="normal" white-space-collapse="true">
        <fo:static-content flow-name="xsl-region-before">
          <fo:block background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="first-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:static-content flow-name="xsl-region-after">
          <fo:block text-align="end" background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="last-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
          <fo:table table-layout="fixed">
            <fo:marker marker-class-name="test">fo:table</fo:marker>
            <fo:table-body>
              <fo:table-cell>
                <fo:block>blah</fo:block>
              </fo:table-cell>
            </fo:table-body>
          </fo:table>
        </fo:flow>
      </fo:page-sequence>
      <fo:page-sequence master-reference="normal" white-space-collapse="true">
        <fo:static-content flow-name="xsl-region-before">
          <fo:block background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="first-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:static-content flow-name="xsl-region-after">
          <fo:block text-align="end" background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="last-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
          <fo:table table-layout="fixed">
            <fo:table-body>
              <fo:marker marker-class-name="test">fo:table-body</fo:marker>
              <fo:table-cell>
                <fo:block>blah</fo:block>
              </fo:table-cell>
            </fo:table-body>
          </fo:table>
        </fo:flow>
      </fo:page-sequence>
      <fo:page-sequence master-reference="normal" white-space-collapse="true">
        <fo:static-content flow-name="xsl-region-before">
          <fo:block background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="first-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:static-content flow-name="xsl-region-after">
          <fo:block text-align="end" background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="last-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
          <fo:table table-layout="fixed">
            <fo:table-header>
              <fo:marker marker-class-name="test">fo:table-header</fo:marker>
              <fo:table-cell>
                <fo:block>header-blah</fo:block>
              </fo:table-cell>
            </fo:table-header>
            <fo:table-body>
              <fo:table-cell>
                <fo:block>blah</fo:block>
              </fo:table-cell>
            </fo:table-body>
          </fo:table>
        </fo:flow>
      </fo:page-sequence>
      <fo:page-sequence master-reference="normal" white-space-collapse="true">
        <fo:static-content flow-name="xsl-region-before">
          <fo:block background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="first-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:static-content flow-name="xsl-region-after">
          <fo:block text-align="end" background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="last-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
          <fo:table table-layout="fixed">
            <fo:table-footer>
              <fo:marker marker-class-name="test">fo:table-footer</fo:marker>
              <fo:table-cell>
                <fo:block>footer-blah</fo:block>
              </fo:table-cell>
            </fo:table-footer>
            <fo:table-body>
              <fo:table-cell>
                <fo:block>blah</fo:block>
              </fo:table-cell>
            </fo:table-body>
          </fo:table>
        </fo:flow>
      </fo:page-sequence>
      <fo:page-sequence master-reference="normal" white-space-collapse="true">
        <fo:static-content flow-name="xsl-region-before">
          <fo:block background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="first-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:static-content flow-name="xsl-region-after">
          <fo:block text-align="end" background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="last-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
          <fo:table table-layout="fixed">
            <fo:table-body>
              <fo:table-cell>
                <fo:marker marker-class-name="test">fo:table-cell</fo:marker>
                <fo:block>blah</fo:block>
              </fo:table-cell>
            </fo:table-body>
          </fo:table>
        </fo:flow>
      </fo:page-sequence>
      <fo:page-sequence master-reference="normal" white-space-collapse="true">
        <fo:static-content flow-name="xsl-region-before">
          <fo:block background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="first-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:static-content flow-name="xsl-region-after">
          <fo:block text-align="end" background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="last-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
          <fo:list-block>
            <fo:marker marker-class-name="test">fo:list-block</fo:marker>
            <fo:list-item>
              <fo:list-item-label>
                <fo:block>label-blah</fo:block>
              </fo:list-item-label>
              <fo:list-item-body>
                <fo:block>body-blah</fo:block>
              </fo:list-item-body>
            </fo:list-item>
          </fo:list-block>
        </fo:flow>
      </fo:page-sequence>
      <fo:page-sequence master-reference="normal" white-space-collapse="true">
        <fo:static-content flow-name="xsl-region-before">
          <fo:block background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="first-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:static-content flow-name="xsl-region-after">
          <fo:block text-align="end" background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="last-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
          <fo:list-block>
            <fo:list-item>
              <fo:marker marker-class-name="test">fo:list-item</fo:marker>
              <fo:list-item-label>
                <fo:block>label-blah</fo:block>
              </fo:list-item-label>
              <fo:list-item-body>
                <fo:block>body-blah</fo:block>
              </fo:list-item-body>
            </fo:list-item>
          </fo:list-block>
        </fo:flow>
      </fo:page-sequence>
      <fo:page-sequence master-reference="normal" white-space-collapse="true">
        <fo:static-content flow-name="xsl-region-before">
          <fo:block background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="first-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:static-content flow-name="xsl-region-after">
          <fo:block text-align="end" background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="last-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
          <fo:list-block>
            <fo:list-item>
              <fo:list-item-label>
                <fo:marker marker-class-name="test">fo:list-item-label</fo:marker>
                <fo:block>label-blah</fo:block>
              </fo:list-item-label>
              <fo:list-item-body>
                <fo:block>body-blah</fo:block>
              </fo:list-item-body>
            </fo:list-item>
          </fo:list-block>
        </fo:flow>
      </fo:page-sequence>
      <fo:page-sequence master-reference="normal" white-space-collapse="true">
        <fo:static-content flow-name="xsl-region-before">
          <fo:block background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="first-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:static-content flow-name="xsl-region-after">
          <fo:block text-align="end" background-color="yellow">
            <fo:retrieve-marker retrieve-class-name="test" retrieve-boundary="page" retrieve-position="last-starting-within-page"/>
          </fo:block>
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
          <fo:list-block>
            <fo:list-item>
              <fo:list-item-label>
                <fo:block>label-blah</fo:block>
              </fo:list-item-label>
              <fo:list-item-body>
                <fo:marker marker-class-name="test">fo:list-item-body</fo:marker>
                <fo:block>body-blah</fo:block>
              </fo:list-item-body>
            </fo:list-item>
          </fo:list-block>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>
  </fo>
  <checks>
    <!-- fo:flow -->
    <eval expected="fo:flow" xpath="//pageViewport[@nr=1]/page/regionViewport[1]/regionBefore/block[1]/lineArea"/>
    <eval expected="fo:flow" xpath="//pageViewport[@nr=1]/page/regionViewport[2]/regionAfter/block[1]/lineArea"/>
    <!-- fo:block -->
    <eval expected="fo:block" xpath="//pageViewport[@nr=2]/page/regionViewport[1]/regionBefore/block[1]/lineArea"/>
    <eval expected="fo:block" xpath="//pageViewport[@nr=2]/page/regionViewport[2]/regionAfter/block[1]/lineArea"/>
    <!-- fo:block-container -->
    <eval expected="fo:block-container" xpath="//pageViewport[@nr=3]/page/regionViewport[1]/regionBefore/block[1]/lineArea"/>
    <eval expected="fo:block-container" xpath="//pageViewport[@nr=3]/page/regionViewport[2]/regionAfter/block[1]/lineArea"/>
    <!-- fo:table -->
    <eval expected="fo:table" xpath="//pageViewport[@nr=4]/page/regionViewport[1]/regionBefore/block[1]/lineArea"/>
    <eval expected="fo:table" xpath="//pageViewport[@nr=4]/page/regionViewport[2]/regionAfter/block[1]/lineArea"/>
    <!-- fo:table-body -->
    <eval expected="fo:table-body" xpath="//pageViewport[@nr=5]/page/regionViewport[1]/regionBefore/block[1]/lineArea"/>
    <eval expected="fo:table-body" xpath="//pageViewport[@nr=5]/page/regionViewport[2]/regionAfter/block[1]/lineArea"/>
    <!-- fo:table-header -->
    <eval expected="fo:table-header" xpath="//pageViewport[@nr=6]/page/regionViewport[1]/regionBefore/block[1]/lineArea"/>
    <eval expected="fo:table-header" xpath="//pageViewport[@nr=6]/page/regionViewport[2]/regionAfter/block[1]/lineArea"/>
    <!-- fo:table-footer -->
    <eval expected="fo:table-footer" xpath="//pageViewport[@nr=7]/page/regionViewport[1]/regionBefore/block[1]/lineArea"/>
    <eval expected="fo:table-footer" xpath="//pageViewport[@nr=7]/page/regionViewport[2]/regionAfter/block[1]/lineArea"/>
    <!-- fo:table-cell -->
    <eval expected="fo:table-cell" xpath="//pageViewport[@nr=8]/page/regionViewport[1]/regionBefore/block[1]/lineArea"/>
    <eval expected="fo:table-cell" xpath="//pageViewport[@nr=8]/page/regionViewport[2]/regionAfter/block[1]/lineArea"/>
    <!-- fo:list-block -->
    <eval expected="fo:list-block" xpath="//pageViewport[@nr=9]/page/regionViewport[1]/regionBefore/block[1]/lineArea"/>
    <eval expected="fo:list-block" xpath="//pageViewport[@nr=9]/page/regionViewport[2]/regionAfter/block[1]/lineArea"/>
    <!-- fo:list-item -->
    <eval expected="fo:list-item" xpath="//pageViewport[@nr=10]/page/regionViewport[1]/regionBefore/block[1]/lineArea"/>
    <eval expected="fo:list-item" xpath="//pageViewport[@nr=10]/page/regionViewport[2]/regionAfter/block[1]/lineArea"/>
  </checks>
</testcase>
