Hi, Chad,
XSLT has a function to handle at least part of the problem:
xsl:normalize-space.
normalize-space removes leading and trailing spaces and reduces any spaces
within the value it receives to one space. So, " one two " becomes
"one two".
HTH
Jay Bryant
Bryant Communication Services
----- Original Message -----
From: "Chad Chelius" <cchelius(_at_)agitraining(_dot_)com>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Wednesday, April 11, 2007 7:25 PM
Subject: [xsl] Removing white space from XML file
I am being supplied an XML file that contains white space in both the
value of elements and also in the general structure of the XML file. Most
often in the value of each element there are several spaces but sometimes
there are other spaces as well. Is there an easy way to remove these?
Also, within the value of each element, there needs to be one space
instead of several. I know this can be accomplished with a find change in
many programs, but it would be great if I could remove these extra spaces
using an XSLT.
chad
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--