<?xml version="1.0" encoding="iso-8859-1"?>

<!--
   This DTD has been developed in order to validate XSL FO documents
   conformant to XSL Recommendation of October 15, 2001. The namespace
   prefix is
  
     xmlns:fo="http://www.w3.org/1999/XSL/Format".

   This DTD also makes provision for few extensions to XSL Rec, put
   into a separate namespace:

     xmlns:rx="http://www.renderx.com/XSL/Extensions".

   Please e-mail your comments to Nikolai Grigoriev <grig@renderx.com>

   c RenderX, 1999-2002.

-->


<!-- *******************************************************************

This DTD was written in mind to validate testcases for the new XSL FO
draft. Therefore, it is restrictive with respect to the spec: some rare
XSL FO features have been dropped in order to validate others more
reliably. Unless a document intentionally uses some of the functionality
listed below in the introductory notes, it shall be conformant to this
DTD in order to be a valid XSL FO document.

INTRODUCTORY NOTES

1. XSL FO are hard to validate by a DTD: attributes are universally
inheritable due to the adoption of the 'inherit' value from CSS2; and
even for the content model, presence of universal wrappers like fo:wrapper
makes it impossible to trace a neat distinction between inline-level and
block-level content. Therefore, this version of the DTD cannot reliably
detect inconsistencies in attribute sets: real checks are performed
only for empty inline elements and top-level elements (fo:layout-master-set
and its descendants).

2. The contents of the fo:instream-foreign-object element is hardvired to
be an SVG graphic. To validate it, this DTD includes an SVG DTD as an
external entity.

DEVIATIONS FROM THE DRAFT

1. Content model for <fo:layout-master-set> is made more strict:
at least one fo:simple-page-master should be present. (I think this
is more like a correction to the spec, rather than a deviation from it).

2. In XSL 1.0, page and region-body margins may be expressed in terms
of space-*. This does not make any sense, as far as no stacked
constraint may occur. For this reason, I have disabled spaces
in this context, leaving only plain old CSS margins.

3. Attributes of elements inside fo:layout-master-set may have a value
of 'inherit'. However, I have disabled the occurrence of such attributes
on parent elements: inheriting them buys us little in terms of
conciseness, but is error-prone in the initial phase.

4. Table-omit-{header|footer}-at-break is added a value of 'inherit',
to align it with the rest of table attributes. (If table-layout may have
it, why these two should not?)

5. Text-align has a closed list of values, neglecting the <string> value
type. The reason is practical: many stylesheet writers are used to write
"centered" and "justified", whereas the correct values for this version
of the draft are "center" and "justify"; catching this error in the DTD
turned out to be useful. Moreover, <string> values are poorly described
in the draft (nothing but a reference to CSS2), and are unlikely to be
implemented soon. (Ultimate reason: changing the attribute value back to
CDATA is a matter of few seconds ;-)).

6. Only basic values for writing-mode are included.

7. "Reference-orientation" is given <angle> values, besides numeric
   ones described in the Recommendation.

8. Several extension elements and properties are added to enable
functionality missing from the Recommendation:

rx:background-content-height (attribute)
rx:background-content-width (attribute)
rx:background-content-type (attribute)
rx:background-scaling (attribute)

   These properties are exact analogs of 'content-height', 'content-width'
   'content-type', and 'scaling' but apply to the background image.

rx:outline (element)
rx:bookmark (element)
rx:bookmark-label (element)

   These elements implement PDF bookmarks.

rx:meta-info (element)
rx:meta-field (element)

   These elements pass meta-information about the document.

rx:page-device (element)

   This element permits passing parameters to setpagedevice
   operator in PostScript

rx:flow-section (element)

   This element permits setting arbitrary number of columns
   in a sigle page.

rx:key (attribute)
rx:page-index (element)

   These elements implement page number lists in indexes.


******************************************************************** -->

<!-- *************************************************************** -->
<!-- Include external DTDs for foreign objects                       -->
<!-- *************************************************************** -->

<!-- Commented out for evaluation version

<!ENTITY % instream-foreign-object-dtd SYSTEM "instream-foreign-object.dtd">

%instream-foreign-object-dtd;

-->

<!-- *************************************************************** -->
<!-- Entity definitions for groups of formatting objects             -->
<!-- *************************************************************** -->

<!ENTITY % basic-inlines "
    fo:bidi-override
  | fo:character
  | fo:external-graphic
  | fo:instream-foreign-object 
  | fo:inline
  | fo:inline-container
  | fo:leader
  | fo:page-number
  | fo:page-number-citation
  | fo:basic-link
  | fo:multi-toggle
  | rx:pinpoint
  | rx:page-index
">

<!ENTITY % basic-blocks "
    fo:block
  | fo:block-container
  | fo:table-and-caption
  | fo:table
  | fo:list-block
">

<!ENTITY % out-of-lines "
    fo:footnote
  | fo:float
">

<!ENTITY % wrappers "
    fo:multi-switch
  | fo:multi-properties
  | fo:wrapper
  | fo:marker
  | fo:retrieve-marker
">

<!ENTITY % inlines "
    #PCDATA
  | %basic-inlines;
  | %out-of-lines;
  | %wrappers;
">

<!ENTITY % blocks "
    %basic-blocks;
  | %out-of-lines;
  | %wrappers;
">

<!ENTITY % mixed-level "
    #PCDATA
  | %basic-inlines;
  | %basic-blocks;
  | %out-of-lines;
  | %wrappers;
">


<!-- *************************************************************** -->
<!-- Entity definitions for common groups of properties              -->
<!-- This grouping reflects properties cooccurrence, rather than     -->
<!-- property semantics. It does not correspond to grouping in the   -->
<!-- draft.                                                          -->
<!-- *************************************************************** -->

<!-- Accessibility Properties                                        -->
<!ENTITY % accessibility-properties "
  source-document  CDATA  #IMPLIED
  role  CDATA  #IMPLIED
">

<!-- Relative Position Properties                                    -->
<!-- 'position' shorthand property also makes part of this group     -->
<!ENTITY % relative-position-properties "
  relative-position  ( auto | static | relative | inherit )  #IMPLIED
  position  ( static | relative | absolute | fixed | inherit)  #IMPLIED
  top  CDATA  #IMPLIED
  right  CDATA  #IMPLIED
  bottom  CDATA  #IMPLIED
  left  CDATA  #IMPLIED
">

<!-- Absolute or Relative Position Properties                       -->
<!-- There is no object that can be positioned only absolutely.     -->
<!-- Therefore, absolute and relative positioning properties are    -->
<!-- grouped together                                               -->
<!ENTITY % absolute-or-relative-position-properties "
  absolute-position  ( auto | absolute | fixed | inherit )  #IMPLIED
  %relative-position-properties;
">


<!-- Aural Properties                                                -->
<!-- 'cue' and 'pause' shorthand properties are also included        -->
<!ENTITY % aural-properties "
  azimuth  CDATA  #IMPLIED
  cue  CDATA  #IMPLIED
  cue-after  CDATA  #IMPLIED
  cue-before  CDATA  #IMPLIED
  elevation  CDATA  #IMPLIED
  pause  CDATA  #IMPLIED
  pause-after  CDATA  #IMPLIED
  pause-before  CDATA  #IMPLIED
  pitch  CDATA  #IMPLIED
  pitch-range  CDATA  #IMPLIED
  play-during  CDATA  #IMPLIED
  richness  CDATA  #IMPLIED
  speak  ( normal | none | spell-out | inherit )  #IMPLIED
  speak-header  ( once | always | inherit ) #IMPLIED
  speak-numeral  ( digits | continuous | inherit )  #IMPLIED
  speak-punctuation  ( code | none | inherit )  #IMPLIED
  speech-rate  CDATA  #IMPLIED
  stress  CDATA  #IMPLIED
  voice-family  CDATA  #IMPLIED
  volume  CDATA  #IMPLIED
">


<!-- Common Border, Padding, and Background Properties               -->
<!-- Relative shorthand properties are also included                 -->
<!ENTITY % border-padding-background-properties "
  background  CDATA  #IMPLIED
  background-attachment  ( scroll | fixed | inherit )  #IMPLIED
  background-color  CDATA  #IMPLIED
  background-image  CDATA  #IMPLIED
  background-position  CDATA  #IMPLIED
  background-position-vertical  CDATA  #IMPLIED
  background-position-horizontal  CDATA  #IMPLIED
  background-repeat  ( repeat | repeat-x | repeat-y
                     | no-repeat | inherit ) #IMPLIED
  rx:background-content-type  CDATA  #IMPLIED
  rx:background-content-height  CDATA  #IMPLIED
  rx:background-content-width  CDATA  #IMPLIED
  rx:background-scaling  ( uniform | non-uniform)  #IMPLIED
  border  CDATA  #IMPLIED
  border-after-color  CDATA  #IMPLIED
  border-after-style  ( none | hidden | dotted | dashed
                      | solid | double | groove | ridge
                      | inset | outset | inherit )  #IMPLIED
  border-after-width  CDATA  #IMPLIED
  border-after-width.length  CDATA  #IMPLIED
  border-after-width.conditionality ( discard | retain)  #IMPLIED
  border-before-color  CDATA  #IMPLIED
  border-before-style  ( none | hidden | dotted | dashed
                       | solid | double | groove | ridge
                       | inset | outset | inherit )   #IMPLIED
  border-before-width  CDATA  #IMPLIED
  border-before-width.length  CDATA  #IMPLIED
  border-before-width.conditionality ( discard | retain)  #IMPLIED
  border-bottom  CDATA  #IMPLIED
  border-bottom-color  CDATA  #IMPLIED
  border-bottom-style  ( none | hidden | dotted | dashed
                       | solid | double | groove | ridge
                       | inset | outset | inherit )   #IMPLIED
  border-bottom-width  CDATA  #IMPLIED
  border-bottom-width.length  CDATA  #IMPLIED
  border-bottom-width.conditionality ( discard | retain)  #IMPLIED
  border-color  CDATA  #IMPLIED
  border-end-color  CDATA  #IMPLIED
  border-end-style  ( none | hidden | dotted | dashed
                    | solid | double | groove | ridge
                    | inset | outset | inherit )   #IMPLIED
  border-end-width  CDATA  #IMPLIED
  border-end-width.length  CDATA  #IMPLIED
  border-end-width.conditionality ( discard | retain)  #IMPLIED
  border-left  CDATA  #IMPLIED
  border-left-color  CDATA  #IMPLIED
  border-left-style  ( none | hidden | dotted | dashed
                     | solid | double | groove | ridge
                     | inset | outset | inherit )   #IMPLIED
  border-left-width  CDATA  #IMPLIED
  border-left-width.length  CDATA  #IMPLIED
  border-left-width.conditionality ( discard | retain)  #IMPLIED
  border-right  CDATA  #IMPLIED
  border-right-color  CDATA  #IMPLIED
  border-right-style  ( none | hidden | dotted | dashed
                      | solid | double | groove | ridge
                      | inset | outset | inherit )   #IMPLIED
  border-right-width  CDATA  #IMPLIED
  border-right-width.length  CDATA  #IMPLIED
  border-right-width.conditionality ( discard | retain)  #IMPLIED
  border-start-color  CDATA  #IMPLIED
  border-start-style  ( none | hidden | dotted | dashed
                      | solid | double | groove | ridge
                      | inset | outset | inherit )   #IMPLIED
  border-start-width  CDATA  #IMPLIED
  border-start-width.length  CDATA  #IMPLIED
  border-start-width.conditionality ( discard | retain)  #IMPLIED
  border-style CDATA #IMPLIED
  border-top  CDATA  #IMPLIED
  border-top-color  CDATA  #IMPLIED
  border-top-style  ( none | hidden | dotted | dashed
                    | solid | double | groove | ridge
                    | inset | outset | inherit )   #IMPLIED
  border-top-width  CDATA  #IMPLIED
  border-top-width.length  CDATA  #IMPLIED
  border-top-width.conditionality ( discard | retain)  #IMPLIED
  border-width  CDATA  #IMPLIED
  padding  CDATA  #IMPLIED
  padding-after  CDATA  #IMPLIED
  padding-after.length  CDATA  #IMPLIED
  padding-after.conditionality ( discard | retain)  #IMPLIED
  padding-before  CDATA  #IMPLIED
  padding-before.length  CDATA  #IMPLIED
  padding-before.conditionality ( discard | retain)  #IMPLIED
  padding-bottom  CDATA  #IMPLIED
  padding-bottom.length  CDATA  #IMPLIED
  padding-bottom.conditionality ( discard | retain)  #IMPLIED
  padding-end  CDATA  #IMPLIED
  padding-end.length  CDATA  #IMPLIED
  padding-end.conditionality ( discard | retain)  #IMPLIED
  padding-left  CDATA  #IMPLIED
  padding-left.length  CDATA  #IMPLIED
  padding-left.conditionality ( discard | retain)  #IMPLIED
  padding-right  CDATA  #IMPLIED
  padding-right.length  CDATA  #IMPLIED
  padding-right.conditionality ( discard | retain)  #IMPLIED
  padding-start  CDATA  #IMPLIED
  padding-start.length  CDATA  #IMPLIED
  padding-start.conditionality ( discard | retain)  #IMPLIED
  padding-top  CDATA  #IMPLIED
  padding-top.length  CDATA  #IMPLIED
  padding-top.conditionality ( discard | retain)  #IMPLIED
">

<!-- Border Precedence Properties for tables                         -->
<!ENTITY % border-precedence-properties "
  border-after-precedence  CDATA  #IMPLIED
  border-before-precedence  CDATA  #IMPLIED
  border-end-precedence  CDATA  #IMPLIED
  border-start-precedence  CDATA  #IMPLIED
">

<!-- Box Size Properties                                             -->
<!ENTITY % box-size-properties "
  height  CDATA  #IMPLIED
  min-height  CDATA  #IMPLIED
  max-height  CDATA  #IMPLIED
  width  CDATA  #IMPLIED
  min-width  CDATA  #IMPLIED
  max-width  CDATA  #IMPLIED
  inline-progression-dimension  CDATA  #IMPLIED
  inline-progression-dimension.minimum  CDATA  #IMPLIED
  inline-progression-dimension.optimum  CDATA  #IMPLIED
  inline-progression-dimension.maximum  CDATA  #IMPLIED
  block-progression-dimension  CDATA  #IMPLIED
  block-progression-dimension.minimum  CDATA  #IMPLIED
  block-progression-dimension.optimum  CDATA  #IMPLIED
  block-progression-dimension.maximum  CDATA  #IMPLIED
">

<!-- Common Area Properties                                          -->
<!ENTITY % area-properties "
  clip  CDATA  #IMPLIED
  overflow  ( visible | hidden | scroll | auto
            | error-if-overflow | inherit )  #IMPLIED
  display-align  ( auto | before | center | after | inherit )  #IMPLIED
  reference-orientation  ( 0 | 90 | 180 | 270 | -90 | -180 | -270 
                         | 0deg  | 90deg   | 180deg  | 270deg
                         | -90deg | -180deg | -270deg | inherit )  #IMPLIED
  writing-mode  ( lr-tb | rl-tb | tb-rl | lr | rl | tb | inherit ) #IMPLIED
">


<!-- Common Font Properties                                          -->
<!-- 'font' shorthand property is also included                      -->
<!ENTITY % font-properties "
  font  CDATA  #IMPLIED
  font-selection-strategy  (auto | character-by-character | inherit)   #IMPLIED
  font-family  CDATA  #IMPLIED
  font-size  CDATA  #IMPLIED
  font-size-adjust  CDATA  #IMPLIED
  font-stretch  (normal | wider | narrower
               | ultra-condensed | extra-condensed | condensed
               | semi-condensed | semi-expanded | expanded
               | extra-expanded | ultra-expanded | inherit) #IMPLIED
  font-style  ( normal | italic | oblique | backslant | inherit)  #IMPLIED
  font-variant  ( normal | small-caps | inherit )  #IMPLIED
  font-weight  (normal | bold | bolder | lighter | inherit
              | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900) #IMPLIED
">

<!-- Common Hyphenation Properties - Inline                          -->
<!-- 'xml:lang' shorthand property is also included                  -->
<!ENTITY % hyphenation-properties-inline "
  country  CDATA  #IMPLIED
  language  CDATA  #IMPLIED
  script  CDATA  #IMPLIED
  xml:lang  CDATA  #IMPLIED
  hyphenate  ( false | true | inherit )  #IMPLIED
  hyphenation-character  CDATA  #IMPLIED
  hyphenation-push-character-count  CDATA  #IMPLIED
  hyphenation-remain-character-count  CDATA  #IMPLIED
">

<!-- Common Hyphenation Properties - Block                           -->

<!ENTITY % hyphenation-properties-block "
  hyphenation-keep  ( auto | column | page | inherit )  #IMPLIED
  hyphenation-ladder-count  CDATA  #IMPLIED
  %hyphenation-properties-inline;
">


<!-- Common CSS Margin Properties                                    -->
<!-- 'margin' shorthand property is also included                    -->
<!ENTITY % margin-properties-CSS "
  margin  CDATA  #IMPLIED
  margin-bottom  CDATA  #IMPLIED
  margin-left  CDATA  #IMPLIED
  margin-right  CDATA  #IMPLIED
  margin-top  CDATA  #IMPLIED
">

<!-- Common Margin Properties - Block                                -->
<!ENTITY % margin-properties-block "
  %margin-properties-CSS;
  space-after  CDATA  #IMPLIED
  space-after.minimum  CDATA  #IMPLIED
  space-after.optimum  CDATA  #IMPLIED
  space-after.maximum  CDATA  #IMPLIED
  space-after.precedence  CDATA  #IMPLIED
  space-after.conditionality  ( retain | discard )  #IMPLIED
  space-before  CDATA  #IMPLIED
  space-before.minimum  CDATA  #IMPLIED
  space-before.optimum  CDATA  #IMPLIED
  space-before.maximum  CDATA  #IMPLIED
  space-before.precedence  CDATA  #IMPLIED
  space-before.conditionality  ( retain | discard )  #IMPLIED
  start-indent  CDATA  #IMPLIED
  end-indent  CDATA  #IMPLIED
">

<!-- Common Margin Properties - Inline                               -->
<!ENTITY % margin-properties-inline "
  %margin-properties-block;
  space-start  CDATA  #IMPLIED
  space-start.minimum  CDATA  #IMPLIED
  space-start.optimum  CDATA  #IMPLIED
  space-start.maximum  CDATA  #IMPLIED
  space-start.precedence  CDATA  #IMPLIED
  space-start.conditionality  ( retain | discard )  #IMPLIED
  space-end  CDATA  #IMPLIED
  space-end.minimum  CDATA  #IMPLIED
  space-end.optimum  CDATA  #IMPLIED
  space-end.maximum  CDATA  #IMPLIED
  space-end.precedence  CDATA  #IMPLIED
  space-end.conditionality  ( retain | discard )  #IMPLIED
">

<!-- Area Alignment Properties - inline                              -->
<!-- 'vertical-align' shorthand is added                             -->                         
<!ENTITY % area-alignment-properties-inline "
  alignment-adjust  CDATA  #IMPLIED
  alignment-baseline  ( auto | baseline | before-edge | text-before-edge
                       | middle | central | after-edge | text-after-edge
                       | top | text-top | bottom | text-bottom
                       | ideographic | alphabetic | hanging
                       | mathematical | inherit )  #IMPLIED
  baseline-shift  CDATA  #IMPLIED
  dominant-baseline  ( auto | use-script | no-change
                     | reset-size | ideographic | alphabetic
                     | hanging | mathematical | central | middle
                     | text-after-edge | text-before-edge |inherit )  #IMPLIED
  vertical-align  CDATA  #IMPLIED
">

<!-- Line Height Properties                                         -->

<!ENTITY % line-height-properties "
  line-height  CDATA  #IMPLIED
  line-height.minimum  CDATA  #IMPLIED
  line-height.optimum  CDATA  #IMPLIED
  line-height.maximum  CDATA  #IMPLIED
  line-height.precedence  CDATA  #IMPLIED
  line-height.conditionality  ( retain | discard )  #IMPLIED
  line-height-shift-adjustment  CDATA  #IMPLIED
">

<!-- Line Related Properties                                         -->
<!-- [!] <string> values are temporarily excluded from text-align    -->

<!ENTITY % line-related-properties "
  text-align  ( start | center | end | justify
              | inside | outside | left | right | inherit )  #IMPLIED
  text-align-last  ( relative | start | center | end | justify
                   | inside | outside | left | right | inherit )  #IMPLIED
  text-indent  CDATA  #IMPLIED
  last-line-end-indent  CDATA  #IMPLIED
  line-stacking-strategy  ( line-height | font-height
                          | max-height | inherit )  #IMPLIED
  linefeed-treatment  ( ignore | preserve | treat-as-space
                      | treat-as-zero-width-space | inherit )  #IMPLIED
  white-space  ( normal | pre | nowrap | inherit )  #IMPLIED
  white-space-treatment  ( ignore | preserve 
                         | ignore-if-before-linefeed | ignore-if-after-linefeed
                         | ignore-if-surrounding-linefeed | inherit )  #IMPLIED
  white-space-collapse  ( false | true | inherit )  #IMPLIED
  wrap-option  ( no-wrap | wrap | inherit )  #IMPLIED
  unicode-bidi  ( normal | embed | bidi-override | inherit )  #IMPLIED
  direction  ( ltr | rtl | inherit )  #IMPLIED
">


<!-- Character Properties                                            -->

<!ENTITY % character-properties "
  letter-spacing  CDATA  #IMPLIED
  letter-spacing.minimum  CDATA  #IMPLIED
  letter-spacing.optimum  CDATA  #IMPLIED
  letter-spacing.maximum  CDATA  #IMPLIED
  letter-spacing.precedence  CDATA  #IMPLIED
  letter-spacing.conditionality  ( retain | discard )  #IMPLIED
  word-spacing  CDATA  #IMPLIED
  word-spacing.minimum  CDATA  #IMPLIED
  word-spacing.optimum  CDATA  #IMPLIED
  word-spacing.maximum  CDATA  #IMPLIED
  word-spacing.precedence  CDATA  #IMPLIED
  word-spacing.conditionality  ( retain | discard )  #IMPLIED
  treat-as-word-space  ( auto | true | false | inherit )  #IMPLIED
  text-decoration  NMTOKENS  #IMPLIED
  score-spaces  ( true | false | inherit )  #IMPLIED
  text-shadow  CDATA  #IMPLIED
  text-transform  ( capitalize | uppercase | lowercase
                  | none | inherit )  #IMPLIED
  suppress-at-line-break  ( auto | suppress | retain | inherit )  #IMPLIED
  text-altitude  CDATA  #IMPLIED
  text-depth  CDATA  #IMPLIED
  glyph-orientation-horizontal ( 0 | 90 | 180 | 270 | -90 | -180 | -270 
                             | 0deg  | 90deg   | 180deg  | 270deg
                             |-90deg | -180deg | -270deg | inherit )  #IMPLIED
  glyph-orientation-vertical ( 0 | 90 | 180 | 270 | -90 | -180 | -270 
                             | 0deg  | 90deg   | 180deg  | 270deg
                             |-90deg | -180deg | -270deg | inherit )  #IMPLIED
  %font-properties;
  %line-height-properties;
">


<!-- Common Keeps and Breaks Properties - Atomic objects             -->
<!-- 'page-break-*' shorthand properties are also included           -->
<!ENTITY % keeps-and-breaks-properties-atomic "
  break-after  ( auto | column | page
               | even-page | odd-page | inherit )  #IMPLIED
  break-before  ( auto | column | page
                | even-page | odd-page | inherit )  #IMPLIED
  keep-with-next  CDATA  #IMPLIED
  keep-with-next.within-line  CDATA  #IMPLIED
  keep-with-next.within-column  CDATA  #IMPLIED
  keep-with-next.within-page  CDATA  #IMPLIED
  keep-with-previous  CDATA  #IMPLIED
  keep-with-previous.within-line  CDATA  #IMPLIED
  keep-with-previous.within-column  CDATA  #IMPLIED
  keep-with-previous.within-page  CDATA  #IMPLIED
  page-break-after  ( auto | always | avoid
                    | left | right | inherit )  #IMPLIED
  page-break-before  ( auto | always | avoid
                     | left | right | inherit )  #IMPLIED
">

<!-- Common Keeps and Breaks Properties - Inline                     -->
<!-- 'page-break-inside' shorthand property is also included         -->
<!ENTITY % keeps-and-breaks-properties-inline "
  %keeps-and-breaks-properties-atomic;
  keep-together  CDATA  #IMPLIED
  keep-together.within-line  CDATA  #IMPLIED
  keep-together.within-column  CDATA  #IMPLIED
  keep-together.within-page  CDATA  #IMPLIED
  page-break-inside  ( avoid | auto | inherit )  #IMPLIED
">

<!-- Common Keeps and Breaks Properties - Block                      -->
<!ENTITY % keeps-and-breaks-properties-block "
  %keeps-and-breaks-properties-inline;
  orphans  CDATA  #IMPLIED
  widows  CDATA  #IMPLIED
">


<!-- Leader and Rule Properties                                      -->

<!ENTITY % leader-properties "
  leader-alignment  ( none | reference-area | page | inherit )  #IMPLIED
  leader-pattern  ( space | rule | dots
                  | use-content | inherit )  #IMPLIED
  leader-pattern-width  CDATA  #IMPLIED
  leader-length  CDATA  #IMPLIED
  leader-length.minimum  CDATA  #IMPLIED
  leader-length.optimum  CDATA  #IMPLIED
  leader-length.maximum  CDATA  #IMPLIED
  rule-style  ( none | dotted | dashed | solid | double
              | groove | ridge | inherit )  #IMPLIED
  rule-thickness  CDATA  #IMPLIED
">

<!-- Table Properties                                                  -->
<!-- 'border-spacing' shorthand property is also included              -->
<!-- 'inherit' property added to table-omit-...er-at-break             -->

<!ENTITY % table-properties "
  border-collapse  ( collapse | collapse-with-precedence | separate | inherit )  #IMPLIED
  border-spacing  CDATA  #IMPLIED
  border-separation  CDATA  #IMPLIED
  border-separation.inline-progression-direction  CDATA  #IMPLIED
  border-separation.block-progression-direction  CDATA  #IMPLIED
  caption-side  ( before | after | start | end
                | top | bottom | left | right | inherit )  #IMPLIED
  empty-cells  ( show | hide | inherit )  #IMPLIED
  table-layout  ( auto | fixed | inherit )  #IMPLIED
  table-omit-header-at-break  ( true | false | inherit )  #IMPLIED
  table-omit-footer-at-break  ( true | false | inherit )  #IMPLIED
">

<!-- List Properties                                                  -->

<!ENTITY % list-properties "
  provisional-distance-between-starts  CDATA  #IMPLIED
  provisional-label-separation  CDATA  #IMPLIED
">

<!-- Float Properties                                                 -->

<!ENTITY % float-properties "
  float  ( before | start | end | left | right | none | inherit )  #IMPLIED
  clear  ( start | end | left | right | both | none | inherit )  #IMPLIED
  intrusion-displace ( auto | none | line | indent | block | inherit ) #IMPLIED
">

<!-- Visibility Properties                                            -->

<!ENTITY % visibility-properties "
  visibility  ( visible | hidden | collapse | inherit )  #IMPLIED
  z-index  CDATA  #IMPLIED
">


<!-- =============================================================== -->
<!-- Set of all inheritable properties. This includes attributes     -->
<!-- marked as inheritable in the spec, as well as all features that -->
<!-- may assume a value of "inherit" (because all such features are  -->
<!-- also permitted at parent elements). By XSL design, this set     -->
<!-- comprises nearly all attributes.                                -->
<!-- =============================================================== -->

<!ENTITY % inheritable-properties "  
  color  CDATA  #IMPLIED
  relative-align  ( before | baseline | inherit )  #IMPLIED
  span  ( none | all | inherit )  #IMPLIED

  %accessibility-properties;
  %absolute-or-relative-position-properties;
  %border-padding-background-properties;
  %border-precedence-properties;
  %aural-properties;
  %box-size-properties;
  %margin-properties-inline;
  %area-properties;
  %area-alignment-properties-inline;
  %character-properties;
  %table-properties;
  %list-properties;
  %float-properties;
  %line-related-properties;
  %leader-properties;
  %keeps-and-breaks-properties-block;
  %hyphenation-properties-block;
  %visibility-properties;
">

<!-- =============================================================== -->
<!-- Common property subsets.                                        -->
<!-- =============================================================== -->

<!-- Properties for every block that may contain text children       -->

<!ENTITY % block-properties "  
  id  CDATA  #IMPLIED
  rx:key  CDATA  #IMPLIED
  %inheritable-properties;
">

<!-- Properties for nonempty inline elements                         -->

<!ENTITY % inline-properties "  
  id  CDATA  #IMPLIED
  rx:key  CDATA  #IMPLIED
  %inheritable-properties;
">


<!-- Properties for empty inline elements that contain characters    -->

<!ENTITY % empty-inline-properties "  
  id  CDATA  #IMPLIED
  rx:key  CDATA  #IMPLIED
  color  CDATA  #IMPLIED
  %accessibility-properties;
  %aural-properties;
  %relative-position-properties;
  %area-alignment-properties-inline;
  %character-properties;
  %border-padding-background-properties;
  %hyphenation-properties-inline;
  %visibility-properties;
">

<!-- Properties for graphical inline elements                        -->

<!ENTITY % graphic-properties "  
  id  CDATA  #IMPLIED
  rx:key  CDATA  #IMPLIED
  content-type  CDATA  #IMPLIED

  %accessibility-properties;
  %relative-position-properties;
  %aural-properties;
  %border-padding-background-properties;
  %margin-properties-inline;
  %area-alignment-properties-inline;
  %box-size-properties;
  %font-properties;
  %line-height-properties;
  %keeps-and-breaks-properties-atomic;

  content-height  CDATA  #IMPLIED
  content-width  CDATA  #IMPLIED
  display-align  ( auto | before | center | after | inherit )  #IMPLIED
  overflow  ( visible | hidden | scroll | auto
            | error-if-overflow | inherit )  #IMPLIED
  scaling  ( uniform | non-uniform | inherit )  #IMPLIED
  scaling-method  ( auto | integer-pixels
                  | resample-any-method | inherit )  #IMPLIED
  text-align  ( start | center | end | justify
              | inside | outside | left | right | inherit )  #IMPLIED
">



<!-- *************************************************************** -->
<!-- Content models and attributes                                   -->
<!--                                                                 -->
<!-- A. Element structure for top-level elements                     -->
<!-- *************************************************************** -->


<!-- =============================================================== -->
<!-- Root element. Contains everything, generates nothing. It has an -->
<!-- id, a FO namespace prefix declaration, and other namespace      -->
<!-- declarations if used. It can also bear inheritable properties,  -->
<!-- passed further to fo:flows/fo:static-contents. Inheritable      -->
<!-- properties from fo:layout-master-set are banned in this version -->
<!-- of the DTD.                                                     -->
<!-- =============================================================== -->

<!ELEMENT fo:root (
    rx:meta-info?,
    rx:page-device?,
    fo:layout-master-set,
    fo:declarations?,
    rx:outline?,
    fo:page-sequence+
  )
>
<!ATTLIST fo:root
  xmlns:fo  CDATA #REQUIRED
  xmlns:rx  CDATA #IMPLIED
  xmlns:svg CDATA #IMPLIED
  media-usage  ( auto | paginate | bounded-in-one-dimension | unbounded ) #IMPLIED
  %inheritable-properties;
>

<!-- =============================================================== -->
<!-- Document meta information - RenderX extension                   -->
<!-- =============================================================== -->

<!ELEMENT rx:meta-info (rx:meta-field+)>
<!ATTLIST rx:meta-info
  xmlns:rx  CDATA #IMPLIED
>

<!ELEMENT rx:meta-field EMPTY>
<!ATTLIST  rx:meta-field
    name CDATA #REQUIRED
    value CDATA #REQUIRED
>

<!ELEMENT rx:page-device EMPTY>
<!ATTLIST  rx:page-device
    input-tray CDATA #IMPLIED
    output-tray CDATA #IMPLIED
    manual-feed (true|false) #IMPLIED

    duplex (true|false) #IMPLIED
    mirror-print (true|false) #IMPLIED
    negative-print (true|false) #IMPLIED

    collate (true|false) #IMPLIED
    number-copies CDATA #IMPLIED
>

<!-- =============================================================== -->
<!-- Color profile declarations                                      -->
<!-- =============================================================== -->

<!ELEMENT fo:declarations (
    fo:color-profile+
  )
>

<!ELEMENT fo:color-profile EMPTY >

<!ATTLIST fo:color-profile
  src  CDATA  #REQUIRED
  color-profile-name  CDATA #REQUIRED
  rendering-intent  CDATA #IMPLIED
>

<!-- =============================================================== -->
<!-- Bookmarks - RenderX extension                                   -->
<!-- =============================================================== -->

<!ELEMENT rx:outline (
    rx:bookmark+
  )
>
<!ATTLIST rx:outline
  xmlns:rx  CDATA #IMPLIED
>

<!ELEMENT rx:bookmark (
    rx:bookmark-label,
    rx:bookmark*
  )
>
<!ATTLIST rx:bookmark
  internal-destination  CDATA  #IMPLIED
  external-destination  CDATA  #IMPLIED
  collapse-subtree  (true | false)  #IMPLIED
>

<!ELEMENT rx:bookmark-label (#PCDATA) >


<!-- =============================================================== -->
<!-- Layout-master-set. Contains a set of page-masters. Neither of   -->
<!-- its descendants generates any area, so no inherited elements    -->
<!-- can be specified on it or on its children.                      -->
<!-- Content model made more strict than in the draft, to enforce    -->
<!-- that a page-sequence-master be always accompanied by at least   -->
<!-- one simple-page-master.                                         -->
<!-- =============================================================== -->


<!ELEMENT fo:layout-master-set
  (
    fo:page-sequence-master*, fo:simple-page-master,
    ( fo:simple-page-master | fo:page-sequence-master )*
  ) 
>

<!-- =============================================================== -->
<!-- Page sequence master                                            -->
<!-- =============================================================== -->

<!ELEMENT fo:page-sequence-master (
    (
      fo:single-page-master-reference
    | fo:repeatable-page-master-reference
    | fo:repeatable-page-master-alternatives
    )+
  )
>
<!ATTLIST fo:page-sequence-master
  master-name  CDATA  #REQUIRED
>

<!-- =============================================================== -->
<!-- Sequence specifiers are predefined sequences of page masters    -->
<!-- that are used by page sequence master to construct a desired    -->
<!-- page collection.                                                -->
<!-- =============================================================== -->

<!ELEMENT fo:single-page-master-reference    EMPTY>
<!ATTLIST fo:single-page-master-reference
  master-reference  CDATA  #REQUIRED
>

<!ELEMENT fo:repeatable-page-master-reference    EMPTY>
<!ATTLIST fo:repeatable-page-master-reference
  master-reference  CDATA  #REQUIRED
  maximum-repeats  CDATA  #IMPLIED
>

<!ELEMENT fo:repeatable-page-master-alternatives 
  ( fo:conditional-page-master-reference+ )
>
<!ATTLIST fo:repeatable-page-master-alternatives
  maximum-repeats  CDATA  #IMPLIED
>

<!ELEMENT fo:conditional-page-master-reference    EMPTY>
<!ATTLIST fo:conditional-page-master-reference
  master-reference  CDATA  #REQUIRED
  page-position  ( first | last | rest | any | inherit )  #IMPLIED
  odd-or-even  ( odd | even | any | inherit )  #IMPLIED
  blank-or-not-blank  ( blank | not-blank | any | inherit )  #IMPLIED
>

<!-- =============================================================== -->
<!-- Simple page master defines a page layout. It does not           -->
<!-- explicitly generate any content. Most of its properties are     -->
<!-- local except for writing-mode and reference-orientation that    -->
<!-- are inherited by the underlying region-* objects.               -->
<!-- =============================================================== -->

<!-- NOTE. We could think about a common background/padding/border   -->
<!-- for every page instance generated by the page master. For such  -->
<!-- a scope, we may add borders/padding/background to its features. -->
<!-- However, in the current version this is ruled out explicitly by -->
<!-- the XSL specs.                                                  -->

<!ELEMENT fo:simple-page-master
  (
    fo:region-body,
    fo:region-before?,
    fo:region-after?,
    fo:region-start?,
    fo:region-end?
  )
>

<!ATTLIST fo:simple-page-master
  %margin-properties-CSS;
  master-name  CDATA  #REQUIRED
  page-height  CDATA  #IMPLIED
  page-width  CDATA  #IMPLIED
  size  CDATA  #IMPLIED
  reference-orientation  ( 0 | 90 | 180 | 270 | -90 | -180 | -270 
                         | 0deg  | 90deg   | 180deg  | 270deg
                         | -90deg | -180deg | -270deg | inherit )  #IMPLIED
  writing-mode  ( lr-tb | rl-tb | tb-rl | lr | rl | tb | inherit ) #IMPLIED
>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- Regions. The page instance is divided into subareas, whose      -->
<!-- properties are described by the five region-* elements. These   -->
<!-- elements by themselves do not generate any content.             -->
<!-- Reference-orientation and writing-mode may be inherited from    -->
<!-- the page master; all other features are local.                  -->
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->

<!ENTITY % region-properties "
  %border-padding-background-properties;
  %area-properties;

  region-name  CDATA  #IMPLIED
">

<!-- =============================================================== -->
<!-- Body region: middle of the page. Unlike side regions, this one  -->
<!-- may have multiple columns.                                      -->
<!-- [!] We have restricted margin properties to be margin-only,     -->
<!-- allowing no spaces. This is done because no clear semantics     -->
<!-- can be ascribed to single components of a space vector.         -->
<!-- =============================================================== -->

<!ELEMENT fo:region-body EMPTY>
<!ATTLIST fo:region-body
  %region-properties;
  %margin-properties-CSS;
  column-count  CDATA  #IMPLIED
  column-gap  CDATA  #IMPLIED
>

<!-- =============================================================== -->
<!-- Side regions: page edges. These regions have extent and         -->
<!-- precedence that is used to arbitrate corner conflicts. Side     -->
<!-- regions are viewed as frames, and may not have margins.         -->
<!-- Extent made obligatory: its default value of 0.0pt does not     -->
<!-- make much sense.                                                -->
<!-- =============================================================== -->

<!ENTITY % side-region-properties "
  %region-properties;
  extent  CDATA  #REQUIRED
  precedence  ( true | false | inherit )  #IMPLIED
">

<!ELEMENT fo:region-before EMPTY>
<!ATTLIST fo:region-before %side-region-properties;>

<!ELEMENT fo:region-after EMPTY>
<!ATTLIST fo:region-after %side-region-properties;>

<!ELEMENT fo:region-start EMPTY>
<!ATTLIST fo:region-start %side-region-properties;>

<!ELEMENT fo:region-end EMPTY>
<!ATTLIST fo:region-end %side-region-properties;>

<!-- =============================================================== -->
<!-- Page sequence defines the order of choosing page masters to     -->
<!-- accomodate all the contents generated by its fo:flow and        -->
<!-- fo:static-content children, and the way of numbering them.      -->
<!-- =============================================================== -->

<!ELEMENT fo:page-sequence
  (
    fo:title?,
    fo:static-content*,
    fo:flow
  )
>
<!ATTLIST fo:page-sequence
  id  CDATA  #IMPLIED
  rx:key  CDATA  #IMPLIED
  master-reference  CDATA  #REQUIRED

  initial-page-number  CDATA  #IMPLIED
  force-page-count  ( auto | even | odd | end-on-even
                    | end-on-odd | no-force | inherit)  #IMPLIED

  format  CDATA  #IMPLIED
  letter-value  ( auto | alphabetic | traditional  )  #IMPLIED
  grouping-separator  CDATA  #IMPLIED
  grouping-size  CDATA  #IMPLIED

  %inheritable-properties;
>

<!-- =============================================================== -->
<!-- Title may not contain out-of-lines.                             -->
<!-- =============================================================== -->

<!ELEMENT fo:title    
    ( #PCDATA
  | %basic-inlines;
  | %wrappers; )*
>

<!ATTLIST fo:title  %inheritable-properties;>


<!-- *************************************************************** -->
<!-- B. Element structure for content-bearing elements               -->
<!-- *************************************************************** -->

<!-- =============================================================== -->
<!-- Flows. They are just sequences of blocks. 'flow-name' feature   -->
<!-- defines linkage of the flow to a region in the page master.     -->
<!-- =============================================================== -->

<!-- =============================================================== -->
<!-- An extension element, fo:flow-section, has been added in order  -->
<!-- to overcome limitations on multicolumn layout imposed by XSL FO -->
<!-- =============================================================== -->

<!ENTITY % flow-properties "
  id  CDATA  #IMPLIED   
  rx:key  CDATA  #IMPLIED
  flow-name  CDATA  #REQUIRED
  %inheritable-properties;
">

<!ELEMENT fo:static-content (%blocks;)+ >
<!ATTLIST fo:static-content %flow-properties; >

<!ELEMENT fo:flow (%blocks; | rx:flow-section)+ >
<!ATTLIST fo:flow %flow-properties; >

<!-- Extension element. Acts like a top-level block -->
<!-- with multiple columns.                         -->

<!ELEMENT rx:flow-section (%blocks;)+ >
<!ATTLIST rx:flow-section
  column-count CDATA #IMPLIED
  column-gap CDATA #IMPLIED
  %block-properties;
>

<!-- =============================================================== -->
<!-- Block is the base element for all content areas. Besides        -->
<!-- properties used to format the block itself, it also conveys     -->
<!-- formatting information to its inline-level children.            -->
<!-- =============================================================== -->

<!ELEMENT fo:block (
    #PCDATA
  | fo:initial-property-set
  | %basic-inlines;
  | %basic-blocks;
  | %out-of-lines;
  | %wrappers;
  )*
>
<!ATTLIST fo:block %block-properties;>

<!-- =============================================================== -->
<!-- Block container                                                 -->
<!-- =============================================================== -->
<!ELEMENT fo:block-container ( %blocks; )+ >
<!ATTLIST fo:block-container %block-properties;>

<!-- *************************************************************** -->
<!-- Inline elements                                                 -->
<!-- *************************************************************** -->

<!-- =============================================================== -->
<!-- Unicode bidi-override                                           -->
<!-- =============================================================== -->

<!ELEMENT fo:bidi-override ( %inlines; )*>
<!ATTLIST fo:bidi-override %inline-properties;>

<!-- =============================================================== -->
<!-- Single character                                                -->
<!-- =============================================================== -->

<!ELEMENT fo:character EMPTY>
<!ATTLIST fo:character
  character  CDATA  #REQUIRED
  %empty-inline-properties;
>

<!-- =============================================================== -->
<!-- Initial property set specifies properties for one or more lines -->
<!-- =============================================================== -->

<!ELEMENT fo:initial-property-set EMPTY>
<!ATTLIST fo:initial-property-set
  %empty-inline-properties;
>

<!-- =============================================================== -->
<!-- External graphic                                                -->
<!-- =============================================================== -->

<!ELEMENT fo:external-graphic EMPTY >
<!ATTLIST fo:external-graphic
  %graphic-properties;
  src  CDATA  #IMPLIED
>

<!-- =============================================================== -->
<!-- In-stream graphic                                               -->
<!-- =============================================================== -->

<!ELEMENT fo:instream-foreign-object ANY>
<!ATTLIST fo:instream-foreign-object %graphic-properties;>


<!-- =============================================================== -->
<!-- An element to mark a point in the XML output (RenderX extension)-->
<!-- =============================================================== -->

<!ELEMENT rx:pinpoint EMPTY>
<!ATTLIST rx:pinpoint
  value CDATA  #REQUIRED

  %accessibility-properties;
  %relative-position-properties;
  %area-alignment-properties-inline;
  %keeps-and-breaks-properties-atomic;
>

<!-- =============================================================== -->
<!-- Inline                                                          -->
<!-- =============================================================== -->

<!ELEMENT fo:inline ( %mixed-level; )*>
<!ATTLIST fo:inline %inline-properties;>

<!-- =============================================================== -->
<!-- Inline container                                                -->
<!-- =============================================================== -->

<!ELEMENT fo:inline-container ( %blocks; )*>
<!ATTLIST fo:inline-container %inline-properties;>

<!-- =============================================================== -->
<!-- Leader                                                          -->
<!-- =============================================================== -->

<!ELEMENT fo:leader ( %inlines; )*>
<!ATTLIST fo:leader
  %inline-properties;
  >

<!-- =============================================================== -->
<!-- Page Number                                                     -->
<!-- =============================================================== -->

<!ELEMENT fo:page-number EMPTY>
<!ATTLIST fo:page-number %empty-inline-properties;>

<!-- =============================================================== -->
<!-- Page number citation                                            -->
<!-- =============================================================== -->

<!ELEMENT fo:page-number-citation EMPTY>
<!ATTLIST fo:page-number-citation
  %empty-inline-properties;
  ref-id  CDATA  #REQUIRED
>

<!-- =============================================================== -->
<!-- Page number list - index entry                                  -->
<!-- =============================================================== -->

<!ELEMENT rx:page-index EMPTY>
<!ATTLIST rx:page-index
  %empty-inline-properties;
  ref-key  CDATA  #REQUIRED
  list-separator  CDATA  #IMPLIED
  range-separator  CDATA  #IMPLIED
  merge-subsequent-page-numbers  CDATA  #IMPLIED
>



<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- Formatting objects for tables.                                  -->
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->

<!-- =============================================================== -->
<!-- Table & Caption is a wrapper to all the stuff pertinent to a    -->
<!-- given table. It generates a block consisting of two subblocks:  -->
<!-- one for the caption, another one for the table itself. The      -->
<!-- placement of these two blocks is controlled by the              -->
<!-- 'caption-side' property: if  caption-side="before"|"after" (or  -->
<!-- their absolute orientation equivalents), the two blocks are     -->
<!-- drawn one after another; if it is "start"|"end", then the       -->
<!-- caption is displayed on the correspondent side of the table.    -->
<!-- In this case, the relative alignment of the two blocks is given -->
<!-- by the 'relative-align'/'display-align' property.               -->
<!--                                                                 -->
<!-- =============================================================== -->

<!ELEMENT fo:table-and-caption (
    fo:table-caption?,
    fo:table
  )
>

<!ATTLIST fo:table-and-caption %block-properties;>


<!-- =============================================================== -->
<!-- Table caption is an area container.                             -->
<!-- =============================================================== -->

<!ELEMENT fo:table-caption ( %blocks; )+ >
<!ATTLIST fo:table-caption %block-properties;>


<!-- =============================================================== -->
<!-- fo:table is the basic element for all tables. All the contents  -->
<!-- placed inside it is distributed over a single rectangular grid  -->
<!-- of rows and columns.                                            -->
<!-- =============================================================== -->


<!ELEMENT fo:table (
    fo:table-column*,
    fo:table-header?,
    fo:table-footer?,
    fo:table-body+
  )
>
<!ATTLIST fo:table  %block-properties;>


<!-- =============================================================== -->
<!-- Table column specifies common properties to ascribe to all      -->
<!-- cells in a column *or a group of columns*. Note that, if both   -->
<!-- 'number-columns-repeated' and 'number-columns-spanned' exceed   -->
<!-- 1, the column counter is increased by 'number-columns-spanned'. -->
<!-- it means that you only set properties for columns:              -->
<!--      'column-number'                                            -->
<!--      'column-number' + 'number-columns-spanned'                 -->
<!--      'column-number' + 2 * 'number-columns-spanned'             -->
<!-- and so on, leaving default properties for intermediate columns. -->
<!-- =============================================================== -->

<!ELEMENT fo:table-column      EMPTY >
<!ATTLIST fo:table-column
  column-number  CDATA  #IMPLIED
  column-width  CDATA  #IMPLIED
  number-columns-repeated  CDATA  #IMPLIED
  number-columns-spanned  CDATA  #IMPLIED
  %inheritable-properties;
>


<!-- =============================================================== -->
<!-- Table header, table footer, and table body are wrappers for     -->
<!-- groups of rows. They contain either one or more fo:table-rows,  -->
<!-- or one or more fo:table-cells; in the latter case, row breaks   -->
<!-- are specified in the cells by 'starts-row'/'ends-row'.          -->
<!-- All these elements are identical both in the content structure  -->
<!-- and in the attributes.                                          -->
<!-- =============================================================== -->

<!ENTITY % row-group " fo:table-row+ | fo:table-cell+ ">

<!ELEMENT fo:table-header ( %row-group; ) >
<!ATTLIST fo:table-header
  id  CDATA  #IMPLIED
  rx:key  CDATA  #IMPLIED
  %inheritable-properties;
>

<!ELEMENT fo:table-footer ( %row-group;) >
<!ATTLIST fo:table-footer
  id  CDATA  #IMPLIED
  rx:key  CDATA  #IMPLIED
  %inheritable-properties;
>

<!ELEMENT fo:table-body ( %row-group; )>
<!ATTLIST fo:table-body
  id  CDATA  #IMPLIED
  rx:key  CDATA  #IMPLIED
  %inheritable-properties;
>


<!-- =============================================================== -->
<!-- Table row.                                                      -->
<!-- =============================================================== -->

<!ELEMENT fo:table-row ( fo:table-cell+ ) >
<!ATTLIST fo:table-row
  id  CDATA  #IMPLIED
  rx:key  CDATA  #IMPLIED
  %inheritable-properties;
>

<!-- =============================================================== -->
<!-- Table cell.                                                     -->
<!-- =============================================================== -->

<!ELEMENT fo:table-cell ( %blocks; )+ >
<!ATTLIST fo:table-cell
  %block-properties;

  column-number  CDATA  #IMPLIED
  ends-row  ( true | false )  #IMPLIED
  number-columns-spanned  CDATA  #IMPLIED
  number-rows-spanned  CDATA  #IMPLIED
  starts-row  ( true | false )  #IMPLIED
>

<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- Formatting objects for lists.                                   -->
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->

<!-- =============================================================== -->
<!-- List block is a block, with some extra features to control the  -->
<!-- disposition of list items.                                      -->
<!-- =============================================================== -->

<!ELEMENT fo:list-block ( fo:list-item+ ) >
<!ATTLIST fo:list-block %block-properties;>

<!-- =============================================================== -->
<!-- List item is a coupling of item label and item body.            -->
<!-- =============================================================== -->

<!ELEMENT fo:list-item ( fo:list-item-label, fo:list-item-body ) >
<!ATTLIST fo:list-item %block-properties;>


<!-- =============================================================== -->
<!-- List item label and list item body                              -->
<!-- =============================================================== -->

<!ELEMENT fo:list-item-label ( %blocks; )+ >
<!ATTLIST fo:list-item-label %block-properties;>

<!ELEMENT fo:list-item-body ( %blocks;)+ >
<!ATTLIST fo:list-item-body %block-properties;>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- Out-of-lines.                                                   -->
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->

<!-- =============================================================== -->
<!-- Floats and footnotes resemble containers. Accordingly, we treat -->
<!-- them as block sequences.                                        -->
<!-- =============================================================== -->

<!ELEMENT fo:float ( %blocks; )+ >
<!ATTLIST fo:float %block-properties;>


<!ELEMENT fo:footnote (
  fo:inline,
  fo:footnote-body
  )
>

<!ATTLIST fo:footnote %block-properties;>


<!ELEMENT fo:footnote-body ( %blocks; )+ >
<!ATTLIST fo:footnote-body %block-properties;>


<!-- =============================================================== -->
<!-- Simple link. From the formatting point of view, it's nothing    -->
<!-- but a regular inline sequence.                                  -->
<!-- =============================================================== -->

<!ELEMENT fo:basic-link ( %mixed-level; )* >
<!ATTLIST fo:basic-link
  %inline-properties;

  external-destination  CDATA  #IMPLIED
  internal-destination  CDATA  #IMPLIED
  indicate-destination  ( true | false )  #IMPLIED
  show-destination  ( replace | new )  #IMPLIED
  destination-placement-offset  CDATA  #IMPLIED
  target-processing-context  CDATA  #IMPLIED
  target-presentation-context  CDATA  #IMPLIED
  target-stylesheet  CDATA  #IMPLIED
>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- Wrappers and Markers.                                           -->
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->

<!-- =============================================================== -->
<!-- Wrapper. This may be useful but breaks every effort to validate -->
<!-- content models for blocks and inlines.                          -->
<!-- =============================================================== -->

<!ELEMENT fo:wrapper ( %mixed-level; )* >
<!ATTLIST fo:wrapper
  id  CDATA  #IMPLIED
  rx:key  CDATA  #IMPLIED
  %inheritable-properties;
>

<!-- =============================================================== -->
<!-- Marker. This element may embrace any content but cannot pass    -->
<!-- properties to its children; so, it may not have features other  -->
<!-- than marker-class-name.                                         -->
<!-- =============================================================== -->

<!ELEMENT fo:marker ( %mixed-level; )* >
<!ATTLIST fo:marker 
  marker-class-name  CDATA  #IMPLIED
>

<!-- =============================================================== -->
<!-- Marker retrieval.                                               -->
<!-- =============================================================== -->

<!ELEMENT fo:retrieve-marker EMPTY>
<!ATTLIST fo:retrieve-marker 
  retrieve-class-name  CDATA  #IMPLIED
  retrieve-position  ( first-starting-within-page
                     | first-including-carryover
                     | last-starting-within-page
                     | last-ending-within-page )  #IMPLIED
  retrieve-boundary  ( page | page-sequence | document )  #IMPLIED
>

<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- Multistate stuff. This section is the least developed in the    -->
<!-- whole DTD, and most solutions are arbitrary. We beg thy pardon. -->
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->

<!-- =============================================================== -->
<!-- Switch. This is a pure logical operator; no formatting may be   -->
<!-- conveyed through it.                                            -->
<!-- =============================================================== -->

<!ELEMENT fo:multi-switch ( fo:multi-case )+ >
<!ATTLIST fo:multi-switch
  %inheritable-properties;

  id  CDATA  #IMPLIED
  rx:key  CDATA  #IMPLIED
  auto-restore  ( true | false )  #IMPLIED
>

<!-- =============================================================== -->
<!-- Single case. Block-level formatting may be conveyed.            -->
<!-- =============================================================== -->

<!ELEMENT fo:multi-case ( %mixed-level; )* >

<!ATTLIST fo:multi-case
  %inheritable-properties;

  id  CDATA  #IMPLIED
  rx:key  CDATA  #IMPLIED
  starting-state  CDATA  #IMPLIED
  case-name  CDATA  #IMPLIED
  case-title  CDATA  #IMPLIED
>

<!-- =============================================================== -->
<!-- Toggle. This is a typical inline.                               -->
<!-- =============================================================== -->

<!ELEMENT fo:multi-toggle ( %inlines; )*>
<!ATTLIST fo:multi-toggle
  %inheritable-properties;

  id  CDATA  #IMPLIED
  rx:key  CDATA  #IMPLIED
  switch-to  CDATA  #IMPLIED
>


<!-- =============================================================== -->
<!-- Multi-properties is listed among block-level elements.          -->
<!-- Formatting common to all property sets can be specified here;   -->
<!-- we expect it to be block-level only.                            -->
<!-- =============================================================== -->


<!ELEMENT fo:multi-properties
  (
    fo:multi-property-set+,
    fo:wrapper
  )
>
<!ATTLIST fo:multi-properties %block-properties;>

<!-- =============================================================== -->
<!-- Multi property set. Since these are properties of a             -->
<!-- fo:multi-properties that is considered a block, we accept only  -->
<!-- block properties here.                                          -->
<!-- =============================================================== -->

<!ELEMENT fo:multi-property-set EMPTY>
<!ATTLIST fo:multi-property-set
  %block-properties;
  active-state  ( link | visited | active | hover | focus )  #REQUIRED
>
