Subject: Re: [xsl] Removing white space from XML file From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Thu, 12 Apr 2007 14:50:23 +0200 |
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).
no, indent="no", which is the default behaviour in the xml output method, never removes white space, it simply tells the processor not to add any extra white space.
The poster was looking for <xsl:strip-space elements="*"/>and the XPath normalize-space() function.
<xsl:template match="node() | @*"> <xsl:copy> <xsl:apply-templates select="@* | node()" /> </xsl:copy> </xsl:template>
<xsl:template match="text()"> <xsl:value-of select="normalize-space(.)" /> </xsl:template>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Removing white space from, David Carlisle | Thread | [xsl] How to move processing instru, J. S. Rawat |
Re: [xsl] Is there a way to avoid E, Abel Braaksma | Date | [xsl] Pre-rendering Output, Mike Wilt |
Month |