xsl:output

Specifies the output for the result tree.

Format

<xsl:output attribute_list /> 

Description

The xsl:output instruction specifies how you want the result tree to be output. However, if you use the XSLT processor to format the result as a string, or to generate DOM nodes, the xsl:output instruction has no effect.

If you specify the xsl:output instruction, the XSLT processor outputs the result tree according to your specification. If you specify it, the xsl:output instruction must be a top-level element.

The attribute list can include the method attribute. The method attribute identifies the overall method you want the XSLT processor to use to output the result tree. The value must be xml, html, or text.

Note that the XSLT processor formats the results of applying the stylesheet. If your stylesheet generates XML or HTML that does not follow all syntax rules, the XSLT processor does not do anything to fix this. For example, if a stylesheet generates multiple root elements, the XSLT processor neither fixes this nor generates an error. You receive a string, and it is only upon examination or use of the string that you would learn that it is not well-formed XML.

If you do not specify an xsl:output instruction that includes the method attribute, the XSLT processor chooses a default as follows:

The other attributes that you can specify in attribute_list provide parameters for the output method. You can specify the following attributes:

The XSLT processor ignores this attribute when the output method is text.

A stylesheet can include multiple xsl:output elements. The XSLT processor effectively merges multiple xsl:output elements into one xsl:output element. If there are multiple values for the same attribute, the XSLT processor uses the last specified value.

In this release, the XSLT processor ignores the following attributes:

Business Solutions & Outsourcing

Business Solutions & Outsourcing companies know the best solutions. That's why they choose Stylus Studio to enhance their business productivity. See which companies are already using Stylus Studio 2006 to take care of their own business!

Sybase

Sybase Adaptive Server Enterprise (ASE) is a powerful high-performance database for recording and retrieving business records. Learn how to develop XML applications for Sybase using Stylus Studio.

OASIS Catalog Support

Stylus Studio's features for working with OASIS catalogs allow you to incorporate any vendor's catalog - or one of your own - in your XML, making writing correct and robust XML easier than ever.

EDI to XML Mapping in Stylus Studio

Learn how to use Stylus Studio's EDI to XML mapping tools in Convert-to-XML, including loading an EDI file, inspecting application control codes, customizing XML output and other advanced EDI to XML mapping features.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member