The <xsl:output> Element

You first saw the <xsl:output> element in Chapter 2, and you use this element primarily to set the type of the result document. That type can determine, for example, whether the XSLT processor will write the XML processing instruction, <?xml version="1.0"?>, at the beginning of the document, and it can determine the MIME type (such as “text/xml” or “text/html”) of documents sent back from an XSLT processor on a Web server to a browser. In addition, if you set the output type to HTML, most XSLT processors recognize that not all elements in HTML need closing as well as opening tags, and so on.

The following list includes the attributes of <xsl-output>:

  • cdata-section-elements(optional). Sets the names of those elements ...

Get Inside XSLT now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.