Chapter 3. Controlling Output
Chapter 3
shows you how to control the XML, HTML, and
text output of an XSLT processor using the XSLT top-level element
output
. You have seen the
output
element in previous examples, but I have only discussed 2 of
output
’s 10 attributes so far.
I’ll talk about each of
output
’s attributes in this
chapter.
In this chapter, I’ll talk about the results you can expect from different output methods in XML, HTML, text, or custom output. I’ll also cover indentation, how to manage XML declarations, document type declarations, CDATA sections, and media types. For more detail, cross-reference this chapter with Section 16 of the XSLT specification.
Tip
Be aware that not all
XSLT processors adhere strictly to the
output
element. There are models in which the XSLT
processor has no control over the final serialization of the output
because the output
values are overridden. You will
see an example of this type of model when you use the Moxie
processor, discussed in Chapter 17.
Get Learning XSLT 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.