6.1. Creating Elements with LREs

Elements that are not part of the input source document can be created using a literal result element, also known as an LRE. LREs are XML elements that are not part of the XSL specification or extension set of elements. They are "literal" elements that are passed through to the output, with the same element-type name and any attributes that are added by the stylesheet. LREs are added by the author of the stylesheet and placed according to the desired output. They are considered templates and can contain instruction elements, but cannot contain top-level elements. An LRE can also be used as the document element of the stylesheet, if the attribute defining it as a stylesheet is used.

An LRE generates an element ...

Get XSLT and XPATH: A Guide to XML Transformations now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.