Next: 4  Package block Up: RichDoc Framework XML Format Specification Previous: 2  Package document

3 Package style

Element styleFile

Style file is a container for styles structures. One style file is one link in a cascading style sheet chain.

Content: styles*

Element styles

Styles structure is a container for style structures. One styles structure provides rules for rendering a document in one context, such as online display, printing, HTML export, or PDF export. Styles structures may be organized into hierarchies bound using the basedOn attribute, which are then used to inherit contained style structures.

Parents: styleFile viewStyles documentStyles

Attributes: name(style) basedOn

Content: style*

Element style

Style structure is a container for value(style) structures. One structure is intended to provide rules for particular document elements, such as paragraphs, tables, lists, list items etc. The name of the style structure is important for matching the style structure with the elements to which it should apply. Style structures may be organized into hierarchies using the basedOn attribute, so that they inherit value(style) structures from each other.

The style element may be also used as a container of style values associated with particular document element, when user specified some property of the element in an ad hoc manner. Any styleElement therefore may have child style element.

Parents: styles styleElement

Attributes: name(style) basedOn

Content: value(style)*

Element value(style)

Style value defines one visual rendering rule to be applied on associated document element. The rule may provide foreground color, background color, font name, margin size etc.

Parents: style

Attributes: name(style) type(styleValue) value(style) inheritable

Mixed Content: (inline | paragraphFragment)*

Attribute name(style)

A name of styles, style or value(style) structure.

Attribute basedOn

This attribute is used to reference styles or style structure from which definitions should be inherited. The link is made according to the referenced name(style) attribute.

Attribute type(styleValue)

Type of value(style), such as Color, String or Float. If the name(style) of the enclosing value corresponds to a known style value, defined in the file styleTemplate.xml, the type attribute may be omitted.

Attribute inheritable

Specifies whether given value(style) associated with some document element may be inherited by style children of that document. For instance, values like colors are usually inherited, while values like margins are not.

Attribute value(style)

The value of the value(style) structure, such as "Times" or "1.0". It is interpreted according to the type(styleValue) attribute, which is either explicitly specified, or inferred from the styleTemplate.xml file. If the value type is Xml (XML markup), it may be specified either as the value of this attribute, or in place as the content of the enclosed value(style) element, if this is more convenient.

Next: 4  Package block Up: RichDoc Framework XML Format Specification Previous: 2  Package document