Skip to Content
XSLT and XPATH: A Guide to XML Transformations
book

XSLT and XPATH: A Guide to XML Transformations

by John Robert Gardner, Zarella L. Rendon
July 2001
Intermediate to advanced
592 pages
11h 16m
English
Pearson
Content preview from XSLT and XPATH: A Guide to XML Transformations

10.2. The <xsl:strip-space> and <xsl:preserve-space> Top-Level Elements

These elements form a complementary pair of XSLT top-level elements whose purpose is to govern the handling of whitespace in the input tree and, by implication, in the output result tree. Both elements have one required attribute, the elements attribute, whose value (tokens) is a whitespace-separated list of element-type names, as shown in the element model definitions for each element below:

<!-- Category: top-level-element -->
<xsl:strip-space
  elements = tokens />
<!-- Category: top-level-element -->
<xsl:preserve-space
  elements = tokens />

The <xsl:preserve-space> top-level element retains whitespace text nodes from the input elements listed in its elements attribute. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning XSLT and XPath: Transforming XML Documents and Data

Beginning XSLT and XPath: Transforming XML Documents and Data

Ian Williams
Java and XSLT

Java and XSLT

Eric M. Burke
Learning XSLT

Learning XSLT

Michael Fitzgerald

Publisher Resources

ISBN: 0130404462Purchase book