Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - XSLT Reference

<xsl:strip-space> Element

Strips white-space-only text nodes that might appear in elements specified by the elements attributes.

<xsl:strip-space
  elements = tokens />

Attributes

elements
The value of this required attribute is a white-space-separated list of name tokens of the nodes whose white-space-only text nodes should be stripped.

Element Information

Number of occurrences Unlimited
Parent elements xsl:stylesheet, xsl:transform
Child elements (No child elements)

Remarks

The <xsl:strip-space> element strips white-space-only text nodes in the specified elements.

By default, all white-space-only text nodes are preserved. If an element name matches a name test in an <xsl:strip-space> element, it is removed from the set of white-space-preserving element names. If an element name matches a name test in an <xsl:preserve-space> element, then it is added back to the set of white-space-preserving element names.

For more information, see "Whitespace Stripping", Section 3.4 of XSL Transformation (XSLT) Version 1.0, W3C Recommendation 16 November, 1999.

Example

See the example in <xsl:preserve-space> Element.

See Also

Controlling White Space with XSLT