Whitespace stripping

Subject: Whitespace stripping
From: Paul Prescod <paul@xxxxxxxxxxx>
Date: Thu, 18 Nov 1999 20:21:14 -0600
I have a hard time thinking when I would use the xsl:strip-space
element. It doesn't do traditional HTML/DSSSL style whitespace
compression. It only strips nodes that are completely text and doesn't
normalize or compress anything else. One might imagine that it would be
useful to strip empty nodes in a table, for example...but not really.
You're likely to use a rule like this in a table:

<xsl:template match="table">
	<xsl:apply-templates select="caption"/>
	<xsl:apply-templates select="th|tr"/>
</xsl:template>

And that surpresses the text nodes anyhow. I suppose it saves typing the
"select" attribute in some cases but it seems like more trouble than it
is worth.

-- 
 Paul Prescod  - ISOGEN Consulting Engineer speaking for himself
Bart: Dad, do I really have to brush my teeth?
Homer: No, but at least wash your mouth out with soda.



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread