Controlling Input Whitespace

XSLT has to handle whitespace in both the stylesheet and the source document in a reasonable and controllable way.

To deal with whitespace in the stylesheet, it employs the following rules:

The rules for whitespace in the source document are the same, with the exception that you can specify the default stripping rules with <xsl:preserve-space> and <xsl:strip-space>: