The simplest pattern simply names the target element. More complex patterns can include ancestors and descendants of the target element along with specific attribute values and uniqueness constraints. There are also elements which match the root element of the document and provide a default action if no specific pattern matches. A conflict resolution mechanism is employed to assert that only a single pattern ever matches a given element. Multiple actions for the same pattern can be introduced with modes .
Modes allow a stylesheet to process the same elements in more than one context.
This allows section titles to be rendered differently in a Table of Contents than they are in the body of the document, for example. Actions Actions are expressed using flow objects. Flow objects encapsulate the general nature of a formatted elementU96this is a paragraph, this is a rule, this is a table, etc. The action portion of a rule describes the sequence of flow objects that should be generated when processing the selected element. Specifying the formatting of an element may involve producing not only a flow object for that element, but possibly flow objects for the children of that element or other arbitrary elements as well.