xsl:strip-space


xsl: strip-space

The <xsl:strip-space> declaration, along with <xsl: preserve-space > , is used to control the way in which whitespace nodes in the source document are handled. The <xsl:strip-space> declaration identifies elements in which whitespace-only text nodes are considered insignificant, so they can be removed from the source tree.

Changes in 2.0

The syntax of a NameTest has been extended to allow the format «*:NCName » , which matches all elements with a given local name , in any namespace.

Format

 <xsl:strip-space   elements = tokens /> 

Position

<xsl:strip-space> is a top-level declaration, which means it is always a child of the <xsl:stylesheet> element. There are no constraints on where it appears relative to other declarations.

Attributes

Name

Value

Meaning

elements

mandatory

Whitespace-separated list of NameTests

Defines elements in the source document whose whitespace-only text nodes are to be removed

The construct NameTest is defined in XPath; because it is used also in XSLT patterns, it is explained in Chapter 6, on page 509.

Content

None, the element is always empty.

Effect, Usage, and Examples

See <xsl:preserve-space> on page 406. The two elements <xsl:strip-space> and <xsl:preserve-space> are closely related , so I have presented the rules and usage guidance in one place.

See Also

  • <xsl:preserve-space> on page 406

  • <xsl:text> on page 459




XSLT 2.0 Programmer's Reference
NetBeansв„ў IDE Field Guide: Developing Desktop, Web, Enterprise, and Mobile Applications (2nd Edition)
ISBN: 764569090
EAN: 2147483647
Year: 2003
Pages: 324

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net