|
Home >Online Product Documentation >Table of Contents >Controlling the Contents of the Result Document Controlling the Contents of the Result DocumentThis section highlights some of the XSLT instructions you can specify in a stylesheet to control the contents of the result document. This section discusses the following topics: Specifying Result FormattingIn a stylesheet, you can specify that the XSLT processor should format the result as XML, HTML, or text. Table 61 describes the XSLT processor output for each alternative: See xsl:output for information about specifying formatting in a stylesheet. Creating New Nodes in the Result DocumentThe simplest way to create new nodes in a result document is to specify them as literal result elements or literal result text in a stylesheet template. For example: This template creates many nodes in the result document that were not in the source document. You can also use XSLT instructions to create new nodes. Typically, you use XSLT instructions when you need to compute the name or value of the node. You can find information about using the following instructions in the XSLT Instructions Quick Reference: You can use the xsl:value-of instruction to provide the contents for a new node. You can also create a new node by copying the current node from the source document to the result document. The current node is the node for which the XSLT processor instantiates a template. See xsl:copy. Controlling White Space in the ResultFor readability, XML documents (both source documents and stylesheets) often include extra white space. White space in XML documents includes spaces, tabs, and new-line characters. Because this white space is for readability, it receives special treatment. Text nodes that contain only white space are Significant white space
Stylus Studio recommends that you specify
To obtain white space for readability during output formatting, specify the |