xsl-list
[Top] [All Lists]

Re: [xsl] Removing white space from XML file

2007-04-11 20:06:38
On 4/11/07, Chad Chelius <cchelius(_at_)agitraining(_dot_)com> wrote:
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.

I think if you set indent="no" in the xsl:output tag of your XSL, it
removes all the extra white spaces between the XML nodes (I tested
this a while ago, if my memory is right then it should work).

<xsl:output method="xml" omit-xml-declaration="no" indent="no"/>

If you know Ant, another way to remove extra white spaces is with
Apache Ant Build.
as shown in the example here:
http://ant.apache.org/manual/OptionalTasks/replaceregexp.html

-Rashmi

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>