Generated Output
There is a class of transformations that are not achievable using literal result elements. For example, if the local name or namespace URI of an element or attribute needs to be calculated based on XSLT processing, a literal result element cannot be used. Conditional emission of attributes is also complicated when using literal result elements. Additionally, any processing instructions or comments that appear in templates are stripped away during processing.
XSLT defines four instructions that can be used to algorithmically generate specific output nodes: xsl:comment, xsl:processing-instruction, xsl:element, and xsl:attribute. These instructions can be used in place of literal result elements, and because they make extensive ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access