The Generated Text Pattern is used when text must be rendered but is not itself included in the XML document. The markup must support the generation of the correct text at the correct place, and may allow the text to be supplied in the document in order to override the automatic generation algorithm.
The Generated Text Pattern has one participant:
Any piece of XML markup may use this pattern, usually via a style sheet.
Generated Text is not marked up directly in the document, since it is not there. If a default value is to be supplied, it may be given in an attribute value or in a subelement.
Generated text may be constant for all occurrences of a given element, such as See also inserted before the content of an <xref> element.
Generated text such as a number for a list item
may be derived automatically from an attribute value
in the content, such as where
<paragraph n="14">Item for discussion
is rendered as:
xiv: Item for discussion
If the value for generated text may have to contain markup or formatting, it will have to be supplied in element content and not in an attribute:
<Requirements> <label>X<sup>4</sup> Optional Requirements Phase</label> . . . </Requirements>
Formatting software generally has to see a start tag or empty element tag at the point at which the Generated Text is to appear. This means that if a group of similar items need to have a Generated Text heading, there should normally be a Container Element grouping the related items, and the generated text produced when the start tag for the container element is seen.