blob: 1e4825bd0e3bb8e51873e6fc0b102c0e598f2327 [file] [log] [blame]
# =========================================================
#
# (c) 2004, RenderX
#
# Author: Alexander Peshkov <peshkov@renderx.com>
#
# Permission is granted to use this document, copy and
# modify free of charge, provided that every derived work
# bear a reference to the present document.
#
# This document contains a computer program written in
# XSL Transformations Language. It is published with no
# warranty of any kind about its usability, as a mere
# example of XSL technology. RenderX shall not be
# considered liable for any damage or loss of data caused
# by use of this program.
#
# =========================================================
namespace local = ""
default namespace fo = "http://www.w3.org/1999/XSL/Format"
namespace rx = "http://www.renderx.com/XSL/Extensions"
include "properties_groups.rnc"
# ****************************************************************************************
# Properties used by top-level elements
# ****************************************************************************************
# ===============================================================
# Root element can bear inheritable properties, passed further to
# fo:flows/fo:static-contents. Inheritable properties from fo:layout-master-set
# are banned in this version of schema.
# ===============================================================
root.attlist =
media-usage.attr?,
inheritable-properties
# ===============================================================
# Document meta information - RenderX extension
# ===============================================================
meta-info.attlist = empty
# lknl klkj kjk
meta-field.attlist =
name.attr,
value.attr
# ===============================================================
# Color profile declarations
# ===============================================================
declarations.attlist = empty
color-profile.attlist =
src.attr,
color-profile-name.attr,
rendering-intent.attr?
# ===============================================================
# Bookmarks - RenderX extension
# ===============================================================
outline.attlist = empty
bookmark.attlist =
(internal-destination.attr | external-destination.attr),
collapse-subtree.attr?
bookmark-label.attlist = empty
# ===============================================================
# 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.
# ===============================================================
layout-master-set.attlist = empty
# ===============================================================
# Page sequence master
# ===============================================================
page-sequence-master.attlist = master-name.attr
# ===============================================================
# Sequence specifiers.
# ===============================================================
single-page-master-reference.attlist = master-reference.attr
repeatable-page-master-reference.attlist =
master-reference.attr,
maximum-repeats.attr?
repeatable-page-master-alternatives.attlist = maximum-repeats.attr?
conditional-page-master-reference.attlist =
master-reference.attr,
page-position.attr?,
odd-or-even.attr?,
blank-or-not-blank.attr?
# ===============================================================
# 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.
simple-page-master.attlist =
margin-properties-CSS,
master-name.attr,
page-height.attr?,
page-width.attr?,
reference-orientation.attr?,
size.attr?,
writing-mode.attr?
# ===============================================================
# Region 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.
# ===============================================================
region-properties =
border-padding-background-properties,
area-properties,
region-name.attr?
# ===============================================================
# Body region: middle of the page. Unlike side regions, this one
# may have multiple columns.
# ===============================================================
# NOTE: 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.
region-body.attlist =
region-properties,
margin-properties-CSS,
column-count.attr?,
column-gap.attr?
# ===============================================================
# 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.
# ===============================================================
# NOTE: Extent made obligatory: its default value of 0.0pt does not
# make much sense.
region-before.attlist =
region-properties,
extent.attr,
precedence.attr?
region-after.attlist =
region-properties,
extent.attr,
precedence.attr?
region-start.attlist =
region-properties,
extent.attr
region-end.attlist =
region-properties,
extent.attr
# ===============================================================
# Page sequence.
# ===============================================================
page-sequence.attlist =
format.attr?,
letter-value.attr?,
grouping-separator.attr?,
grouping-size.attr?,
id.attr?,
rx-key.attr?,
initial-page-number.attr?,
force-page-count.attr?,
master-reference.attr,
inheritable-properties
# ===============================================================
# Title
# ===============================================================
#MEMO: Why 'id' attribute is not allowed here?
#MEMO: Does it makes sence to add relative-position here?
# According to Section 7.12.1. "relative-position" it is allowed everywhere except fo:block-container
#Should we allow all inline properties here??
title.attlist =
accessibility-properties,
aural-properties-unheritable,
border-padding-background-properties,
margin-properties-inline,
inheritable-properties
# ===============================================================
# Flows. 'flow-name' feature defines linkage of the flow to a region in the page master.
# ===============================================================
flow-properties =
id.attr?,
rx-key.attr?,
flow-name.attr,
inheritable-properties
flow.attlist = flow-properties
static-content.attlist = flow-properties
# ===============================================================
# An extension element, rx:flow-section.
# Acts like a top-level block with multiple columns.
# ===============================================================
flow-section.attlist =
column-count.attr?,
column-gap.attr?,
border-padding-background-properties,
margin-properties-block,
inheritable-properties
# ****************************************************************************************
# Properties used by content-bearing elements
# ****************************************************************************************
# ===============================================================
# Properties of block formatting objects.
# ===============================================================
# ===============================================================
# Besides properties used to format the block itself, it also conveys
# formatting information to its inline-level children.
# ===============================================================
block.attlist =
block-properties,
character-properties-unheritable,
text-altitude.attr?,
text-depth.attr?
# ===============================================================
# Block container
# ===============================================================
#MEMO: We are forced to create separate element 'absolute-container' in order
# to satisfy XSL FO spec requirements.
absolute-container.attlist =
absolute-position-properties,
area-properties-unheritable,
box-size-properties,
common-block-properties,
z-index.attr?
# 'Usual' container element
#MEMO: XSLFO spec prohibits use of 'relative-position' for fo:block-container,
# but we believe that it should be allowed for non-absolutely positioned containers.
block-container.attlist =
area-properties-unheritable,
box-size-properties,
block-properties,
container-position.attr?,
z-index.attr?
# ===============================================================
# Properties of inline formatting objects.
# ===============================================================
# ===============================================================
# Unicode bidi-override
# ===============================================================
#MEMO: This element is 'half-inline' accroding to spec, since it's exhibits the same
# bahavior and used in the same context but yet cannot carry some of inline-level
# properties such as margins and border.
# We use the same set of properties as for inline here (except for unicode-bidi and
# width properties) since we believe that this is a typical inline element.
# Moreover fo:bidi-override is redundant from semantic point of view since it do not
# carry any additional information compared to regular fo:inline - just add
# 'unicode-bidi' to fo:inline and you do not need fo:bidi-override anymore.
bidi-override.attlist =
inline-properties,
unicode-bidi.attr?
#MEMO: 'Folint' believes that direction property is required for fo:bidi-override,
# but this is against the spec since this property can be inherited.
# ===============================================================
# Single character
# ===============================================================
character.attlist =
character.attr,
suppress-at-line-break.attr?,
treat-as-word-space.attr?,
common-inline-properties
# ===============================================================
# Initial property set specifies properties for one or more lines
# ===============================================================
#MEMO: Spec is contradictory here. It states that use of this object is equivalent to
# the fo:wrapper around the first line. At the same time spec allows on this element
# such properties as 'Common Border, Padding, and Background Properties'
# - fo:wrapper can't have border/padding/etc and can bear inheritable properties only.
# We believe that this element should be treated as inline and thus should have
# appropriate properties set.
initial-property-set.attlist =
common-inline-properties
# ===============================================================
# External graphic
# ===============================================================
external-graphic.attlist =
graphic-properties,
src.attr?
# ===============================================================
# In-stream graphic
# ===============================================================
instream-foreign-object.attlist =
graphic-properties
# ===============================================================
# Inline
# ===============================================================
inline.attlist =
height-properties,
inline-properties
# ===============================================================
# Inline container
# ===============================================================
# FIXME! We believe that this element should not bear not-inheritable properties,
# which applies to text since it can't have text children.
# Therefor we do not use 'common-inline-properties' set.
inline-container.attlist =
id.attr?,
rx-key.attr?,
accessibility-properties,
aural-properties-unheritable,
area-alignment-properties,
border-padding-background-properties,
keeps-properties-atomic,
margin-properties-inline,
relative-position-properties,
area-properties-unheritable,
box-size-properties,
inheritable-properties
# ===============================================================
# Leader
# ===============================================================
leader.attlist =
inline-properties
#MEMO: Note that 'inline-properties' includes block-level inheritable properties.
# But it's OK in our content-model since it allows block-level descendants wrapped
# into fo:inline-container.
# At the same time block-level inheritable properties includes leader properties,
# since they are inheritable...
# ===============================================================
# Page Number
# ===============================================================
page-number.attlist =
common-inline-properties,
wrap-option.attr?
# ===============================================================
# Page number citation
# ===============================================================
page-number-citation.attlist =
common-inline-properties,
wrap-option.attr?,
ref-id.attr
# ===============================================================
# Atomic elements for index ranges markup
# ===============================================================
begin-index-range.attlist = id.attr, rx-key.attr
end-index-range.attlist = ref-id.attr
# ===============================================================
# Page number list - index entry
# ===============================================================
page-index.attlist =
common-inline-properties,
wrap-option.attr?,
list-separator.attr?,
ref-key.attr?
#MEMO: There is no 'ref-key' attribute on page-index now, but it is allowed for
# backward compatibility.
#MEMO: Actually it makes sense to exclude id/rx:key fom the set of availabe properties
# for 'index-item', however we prefer no to do it just to avoid creation of yet another content
# model (attribute set) for thid inline element.
index-item.attlist =
common-inline-properties,
wrap-option.attr?,
ref-key.attr,
link-back.attr?,
range-separator.attr?,
merge-subsequent-page-numbers.attr?
# ===============================================================
# Properties of table formatting objects.
# ===============================================================
# ===============================================================
# Table & Caption.
# ===============================================================
table-and-caption.attlist =
common-block-properties,
clear.attr?,
relative-position-properties,
keeps-and-breaks-properties-atomic
#MEMO: Spec do not allows margins on fo:table-caption that is against common sence
# since this is a typical container.
# We do allow margins (they are included in common-block-properties).
# 'Folint' does the same.
table-caption.attlist =
clear.attr?,
common-block-properties,
relative-position-properties,
box-size-properties
table.attlist =
clear.attr?,
common-block-properties,
box-size-properties,
keeps-and-breaks-properties-atomic,
table-properties-unheritable
# ===============================================================
# 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.
# ===============================================================
table-column.attlist =
column-number.attr?,
column-width.attr?,
number-columns-repeated.attr?,
number-columns-spanned.attr?,
background-properties,
#MEMO: Border properties applies to this formatting object only if the value of border-collapse
# for the table is "collapse" or "collapse-with-precedence"
border-properties,
border-precedence-properties,
inheritable-properties
# ===============================================================
# Table header, table footer, and table body.
# ===============================================================
row-group.attlist =
id.attr?,
rx-key.attr?,
accessibility-properties,
aural-properties-unheritable,
background-properties,
#MEMO: Border properties applies to this formatting object only if the value of border-collapse
# for the table is "collapse" or "collapse-with-precedence"
border-properties,
border-precedence-properties,
relative-position-properties,
inheritable-properties
table-header.attlist = row-group.attlist
table-footer.attlist = row-group.attlist
#MEMO: Spec do not list "Keep" properties almong applicable to fo:table-body that is a clear
# case of errata.
table-body.attlist =
row-group.attlist,
keeps-and-breaks-properties-atomic
# ===============================================================
# Table row.
# ===============================================================
#MEMO: Should we create separate collection of properties in 'properties_groups.rnc'
# based on row-group.attlist?
table-row.attlist =
row-group.attlist,
height-properties,
keeps-and-breaks-properties-atomic
# ===============================================================
# Table cell.
# ===============================================================
#MEMO: Spec do not allows margins on fo:table-cell but 'Folint' does.
# We excluded margins from this element and therefor don't use 'common-block-properties'
#MEMO: Spec do not list "Keep" properties almong applicable to fo:table-cell that is a clear
# case of errata.
table-cell.attlist =
id.attr?,
rx-key.attr?,
column-number.attr?,
accessibility-properties,
aural-properties-unheritable,
border-padding-background-properties,
border-precedence-properties,
box-size-properties,
ends-row.attr?,
keeps-and-breaks-properties-atomic,
number-columns-spanned.attr?,
number-rows-spanned.attr?,
starts-row.attr?,
inheritable-properties
# ===============================================================
# Properties of list formatting objects.
# ===============================================================
# ===============================================================
# List block.
# ===============================================================
list-block.attlist =
clear.attr?,
common-block-properties,
keeps-and-breaks-properties-atomic,
relative-position-properties
# ===============================================================
# List item.
# ===============================================================
list-item.attlist =
common-block-properties,
keeps-and-breaks-properties-atomic,
relative-position-properties
# ===============================================================
# List item label and list item body
# ===============================================================
list-item-label.attlist =
id.attr?,
rx-key.attr?,
accessibility-properties,
inheritable-properties
list-item-body.attlist =
id.attr?,
rx-key.attr?,
accessibility-properties,
inheritable-properties
# ===============================================================
# Floats and footnotes.
# ===============================================================
#MEMO: Outlines can't have id and therefor can't have rx:key properties so we are strict here.
# 'Folint' is loose here - it allows use of these properties.
#MEMO: We are forced to create two types of floats: side-floats and before-floats.
side-float.attlist =
side-float.attr?,
clear.attr?,
inheritable-properties
# NOTE: before-float can't bear 'clear' property
before-float.attlist =
before-float.attr?,
inheritable-properties
footnote.attlist =
accessibility-properties,
inheritable-properties
footnote-body.attlist =
accessibility-properties,
inheritable-properties
# ===============================================================
# Simple link.
# ===============================================================
basic-link.attlist =
inline-properties,
external-destination.attr?,
internal-destination.attr?,
indicate-destination.attr?,
show-destination.attr?,
destination-placement-offset.attr?,
target-processing-context.attr?,
target-presentation-context.attr?,
target-stylesheet.attr?
# ===============================================================
# Wrappers.
# ===============================================================
wrapper.attlist =
id.attr?,
rx-key.attr?,
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.
# ===============================================================
#MEMO: We are more strict here making marker-class-name attribute a mandatory,
# but marker with no marker-class-name is meaningless.
marker.attlist = marker-class-name.attr
# ===============================================================
# Marker retrieval.
# ===============================================================
# FIXME! We are more strict here making retrieve-class-name attribute a mandatory,
# but marker with no retrieve-class-name is meaningless.
retrieve-marker.attlist =
retrieve-class-name.attr,
retrieve-position.attr?,
retrieve-boundary.attr?,
#MEMO: Is it OK to allow inheritable properties here? There are no explicit arguments
# against it in the spec.
inheritable-properties
# ===============================================================
# Multistate stuff.
# ===============================================================
# ===============================================================
# Switch.
# ===============================================================
#MEMO: Should we have Aural Properties here as well?
multi-switch.attlist =
id.attr?,
rx-key.attr?,
auto-restore.attr?,
accessibility-properties,
inheritable-properties
# ===============================================================
# Single case.
# ===============================================================
multi-case.attlist =
id.attr?,
rx-key.attr?,
starting-state.attr?,
case-name.attr?,
case-title.attr?,
accessibility-properties,
inheritable-properties
# ===============================================================
# Toggle.
# ===============================================================
#MEMO: Should we have here inline-level properties only?
multi-toggle.attlist =
switch-to.attr?,
accessibility-properties,
inheritable-properties
# ===============================================================
# Multi-properties.
# ===============================================================
#Should we allow here any possible properties applicable to the objects inside of the flow?
multi-properties.attlist =
id.attr?,
rx-key.attr?,
accessibility-properties,
inheritable-properties
# ===============================================================
# Multi property set.
# ===============================================================
#Should we allow here any possible properties applicable to the objects inside of the flow?
multi-property-set.attlist =
id.attr?,
rx-key.attr?,
active-state.attr,
inheritable-properties