Name
<xsl:output>
Defines the characteristics of an output document.
Category
Top-level element.
Required Attributes
None.
Optional Attributes
method
Typically has one of four values:
xml
,html
,xhtml
, ortext
. This value indicates the type of document that is generated. An XSLT processor can add other values to this list; how those values affect the generated document is determined by the XSLT processor. The default value isxml
unless the root element of the output document is<html>
.[1.0] In XSLT 1.0, there are only three output methods defined in the standard:
xml
,html
, andtext
. [2.0] In XSLT 2.0,xhtml
has been added as an output method that must be supported by an XSLT processor. Individual processors are still free to add other values as well. To simplify our discussion here, we’ll discussxhtml
as one of the standard output types without constantly reminding you that it’s not available in XSLT 1.0.version
Defines the version of the XML, HTML, or XHTML output document. This attribute is ignored with
method="text"
.Note
The
version
attribute of the<xsl:output>
element works differently from theversion
attribute that is legal on every XSLT element in XSLT 2.0. See “[2.0] Attributes common to all XSLT elements” earlier in this appendix for more details.encoding
Defines the value of the
encoding
specified in the XML declaration in the output document. This attribute is ignored withmethod="text"
.omit-xml-declaration
Defines whether the XML declaration is omitted in the output document. ...
Get XSLT, 2nd Edition 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.