O'Reilly logo

XSLT, 2nd Edition by Doug Tidwell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, or text. 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 is xml 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, and text. [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 discuss xhtml 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 the version 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 with method="text".

omit-xml-declaration

Defines whether the XML declaration is omitted in the output document. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required