<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright (c) 2017-2018 XMLmind Software.
This file is part of the XMLmind FO Converter XSL-FO Test Cases.
Permission is granted to copy and modify this file provided that any work
derived from it bear a reference to the original document.
-->
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
         xmlns:xfc="http://www.xmlmind.com/foconverter/xsl/extensions">
  <fo:layout-master-set>
    <fo:simple-page-master margin-bottom="1.5cm" margin-left="1.5cm"
                           margin-right="1.5cm" margin-top="1.5cm"
                           master-name="all-pages" page-height="29.7cm"
                           page-width="21cm">
      <fo:region-body border-style="solid" border-width="1pt"
                      margin-bottom="10pt + 0.5cm" margin-top="0.5cm" 
                      padding="7.5pt" />

      <fo:region-before display-align="before" extent="0.5cm" />

      <fo:region-after display-align="after" extent="0.5cm" />
    </fo:simple-page-master>
  </fo:layout-master-set>

  <fo:page-sequence master-reference="all-pages">
    <fo:static-content flow-name="xsl-region-before">
      <fo:block font-family="Helvetica" font-size="10pt"><fo:table
          border-style="none" width="100%">
          <fo:table-body>
            <fo:table-row>
              <fo:table-cell width="50%">
                <fo:block text-align="left">XMLmind FO Converter</fo:block>
              </fo:table-cell>

              <fo:table-cell width="50%">
                <fo:block text-align="right">XSL-FO Test Case</fo:block>
              </fo:table-cell>
            </fo:table-row>
          </fo:table-body>
        </fo:table></fo:block>
    </fo:static-content>

    <fo:static-content flow-name="xsl-region-after">
      <fo:block font-family="Helvetica" font-size="10pt"><fo:table
          border-style="none" width="100%">
          <fo:table-body>
            <fo:table-row>
              <fo:table-cell width="50%">
                <fo:block text-align="left">Nested Lists</fo:block>
              </fo:table-cell>

              <fo:table-cell width="50%">
                <fo:block text-align="right"><fo:page-number /> /
                <fo:page-number-citation ref-id="end" /></fo:block>
              </fo:table-cell>
            </fo:table-row>
          </fo:table-body>
        </fo:table></fo:block>
    </fo:static-content>

    <fo:flow flow-name="xsl-region-body">
      <fo:block background-color="rgb(240,240,240)" border-style="solid"
      border-width="0.5pt" font-size="14pt" padding-bottom="3pt"
      padding-top="3pt" text-align="center">Nested Lists</fo:block>

      <fo:block margin-left="0.5cm" margin-right="0.5cm"
      space-before="10pt"><fo:block space-before="5pt">Here is an example of
      nested lists:</fo:block><fo:list-block margin-left="0.5cm"
          margin-right="0.5cm" provisional-distance-between-starts="0.8cm"
          provisional-label-separation="5pt" space-before="5pt">
          <fo:list-item space-before="5pt">
            <fo:list-item-label end-indent="label-end()">
              <fo:block>1.</fo:block>
            </fo:list-item-label>

            <fo:list-item-body start-indent="body-start()">
              <fo:block>This is the first item of the outermost list. It
              contains another numbered list, followed by a plain
              paragraph.</fo:block>

              <fo:list-block font-family="Helvetica" font-size="smaller"
                             margin-left="0.5cm"
                             provisional-distance-between-starts="0.8cm"
                             provisional-label-separation="5pt"
                             space-before="5pt">
                <fo:list-item space-before="5pt">
                  <fo:list-item-label end-indent="label-end()">
                    <fo:block>a)</fo:block>
                  </fo:list-item-label>

                  <fo:list-item-body start-indent="body-start()">
                    <fo:block>This is the first item of the inner numbered
                    list. It contains a bulleted list, followed by a plain
                    paragraph.</fo:block>

                    <fo:list-block font-family="Courier" margin-left="10pt"
                                   provisional-distance-between-starts="0.4cm"
                                   provisional-label-separation="5pt"
                                   space-before="2pt">
                      <fo:list-item>
                        <fo:list-item-label end-indent="label-end()">
                          <fo:block>&#8226;</fo:block>
                        </fo:list-item-label>

                        <fo:list-item-body start-indent="body-start()">
                          <fo:block>This is the first item of the bulleted
                          list.</fo:block>
                        </fo:list-item-body>
                      </fo:list-item>

                      <fo:list-item>
                        <fo:list-item-label end-indent="label-end()">
                          <fo:block>&#8226;</fo:block>
                        </fo:list-item-label>

                        <fo:list-item-body start-indent="body-start()">
                          <fo:block>This is the second item of the bulleted
                          list.</fo:block>
                        </fo:list-item-body>
                      </fo:list-item>
                    </fo:list-block>

                    <fo:block space-before="2pt">This is the last block of the
                    first item of the inner numbered list.</fo:block>
                  </fo:list-item-body>
                </fo:list-item>

                <fo:list-item space-before="5pt">
                  <fo:list-item-label end-indent="label-end()">
                    <fo:block>b)</fo:block>
                  </fo:list-item-label>

                  <fo:list-item-body start-indent="body-start()">
                    <fo:block>This is the second item of the inner numbered
                    list. It contains a bulleted list.</fo:block>

                    <fo:list-block font-family="Courier" margin-left="10pt"
                                   provisional-distance-between-starts="0.4cm"
                                   provisional-label-separation="5pt"
                                   space-before="2pt">
                      <fo:list-item>
                        <fo:list-item-label end-indent="label-end()">
                          <fo:block>&#8226;</fo:block>
                        </fo:list-item-label>

                        <fo:list-item-body start-indent="body-start()">
                          <fo:block>This is the first item of the bulleted
                          list.</fo:block>
                        </fo:list-item-body>
                      </fo:list-item>

                      <fo:list-item>
                        <fo:list-item-label end-indent="label-end()">
                          <fo:block>&#8226;</fo:block>
                        </fo:list-item-label>

                        <fo:list-item-body start-indent="body-start()">
                          <fo:block>This is the second item of the bulleted
                          list.</fo:block>
                        </fo:list-item-body>
                      </fo:list-item>
                    </fo:list-block>
                  </fo:list-item-body>
                </fo:list-item>
              </fo:list-block>

              <fo:block space-before="3pt">This is the last block of the first
              item of the outermost list.</fo:block>
            </fo:list-item-body>
          </fo:list-item>

          <fo:list-item space-before="5pt">
            <fo:list-item-label end-indent="label-end()">
              <fo:block>2.</fo:block>
            </fo:list-item-label>

            <fo:list-item-body start-indent="body-start()">
              <fo:block>This is the second item of the outermost
              list.</fo:block>
            </fo:list-item-body>
          </fo:list-item>
        </fo:list-block></fo:block>

      <fo:block margin-left="0.5cm" margin-right="0.5cm"
      space-before="40pt"><fo:block space-before="5pt">Same nested lists as
      above but first nested list has proprietary extension attribute 
      <fo:inline font-family="Courier" 
      font-size="smaller">xfc:label-format="%{lower-alpha;inherit})"</fo:inline>
      in order to &#x201C;inherit&#x201D; the numbering of its
      ancestor lists:</fo:block><fo:list-block margin-left="0.5cm"
          margin-right="0.5cm" provisional-distance-between-starts="0.8cm"
          provisional-label-separation="5pt" space-before="5pt">
          <fo:list-item space-before="5pt">
            <fo:list-item-label end-indent="label-end()">
              <fo:block>1.</fo:block>
            </fo:list-item-label>

            <fo:list-item-body start-indent="body-start()">
              <fo:block>This is the first item of the outermost list. It
              contains another numbered list, followed by a plain
              paragraph.</fo:block>

              <fo:list-block font-family="Helvetica" font-size="smaller"
                             margin-left="0.5cm"
                             provisional-distance-between-starts="0.8cm"
                             provisional-label-separation="5pt"
                             space-before="5pt"
                             xfc:label-format="%{lower-alpha;inherit})">
                <fo:list-item space-before="5pt">
                  <fo:list-item-label end-indent="label-end()">
                    <fo:block>1.a)</fo:block>
                  </fo:list-item-label>

                  <fo:list-item-body start-indent="body-start()">
                    <fo:block>This is the first item of the inner numbered
                    list. It contains a bulleted list, followed by a plain
                    paragraph.</fo:block>

                    <fo:list-block font-family="Courier" margin-left="10pt"
                                   provisional-distance-between-starts="0.4cm"
                                   provisional-label-separation="5pt"
                                   space-before="2pt">
                      <fo:list-item>
                        <fo:list-item-label end-indent="label-end()">
                          <fo:block>&#8226;</fo:block>
                        </fo:list-item-label>

                        <fo:list-item-body start-indent="body-start()">
                          <fo:block>This is the first item of the bulleted
                          list.</fo:block>
                        </fo:list-item-body>
                      </fo:list-item>

                      <fo:list-item>
                        <fo:list-item-label end-indent="label-end()">
                          <fo:block>&#8226;</fo:block>
                        </fo:list-item-label>

                        <fo:list-item-body start-indent="body-start()">
                          <fo:block>This is the second item of the bulleted
                          list.</fo:block>
                        </fo:list-item-body>
                      </fo:list-item>
                    </fo:list-block>

                    <fo:block space-before="2pt">This is the last block of the
                    first item of the inner numbered list.</fo:block>
                  </fo:list-item-body>
                </fo:list-item>

                <fo:list-item space-before="5pt">
                  <fo:list-item-label end-indent="label-end()">
                    <fo:block>1.b)</fo:block>
                  </fo:list-item-label>

                  <fo:list-item-body start-indent="body-start()">
                    <fo:block>This is the second item of the inner numbered
                    list. It contains a bulleted list.</fo:block>

                    <fo:list-block font-family="Courier" margin-left="10pt"
                                   provisional-distance-between-starts="0.4cm"
                                   provisional-label-separation="5pt"
                                   space-before="2pt">
                      <fo:list-item>
                        <fo:list-item-label end-indent="label-end()">
                          <fo:block>&#8226;</fo:block>
                        </fo:list-item-label>

                        <fo:list-item-body start-indent="body-start()">
                          <fo:block>This is the first item of the bulleted
                          list.</fo:block>
                        </fo:list-item-body>
                      </fo:list-item>

                      <fo:list-item>
                        <fo:list-item-label end-indent="label-end()">
                          <fo:block>&#8226;</fo:block>
                        </fo:list-item-label>

                        <fo:list-item-body start-indent="body-start()">
                          <fo:block>This is the second item of the bulleted
                          list.</fo:block>
                        </fo:list-item-body>
                      </fo:list-item>
                    </fo:list-block>
                  </fo:list-item-body>
                </fo:list-item>
              </fo:list-block>

              <fo:block space-before="3pt">This is the last block of the first
              item of the outermost list.</fo:block>
            </fo:list-item-body>
          </fo:list-item>

          <fo:list-item space-before="5pt">
            <fo:list-item-label end-indent="label-end()">
              <fo:block>2.</fo:block>
            </fo:list-item-label>

            <fo:list-item-body start-indent="body-start()">
              <fo:block>This is the second item of the outermost
              list.</fo:block>
            </fo:list-item-body>
          </fo:list-item>
        </fo:list-block></fo:block>

      <fo:block id="end"></fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>
