[Home] [By Thread] [By Date] [Recent Entries]
Hi,
Something like below will do it: <xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*"/>
</xsl:copy>
</xsl:template><xsl:template match="text()" priority="1"> <xsl:variable name="normalized" select="normalize-space(.)"/> <xsl:variable name="firstToken" select="substring-before($normalized, ' ')"/> <xsl:value-of select="if ($normalized='' or $firstToken!='') then concat ($firstToken, substring-after(., $firstToken)) else concat ($normalized, substring-after(., $normalized)) "/> </xsl:template> Depending on your actual needs you may find that the simpler solution below also works for you: <xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*"/>
</xsl:copy>
</xsl:template><xsl:template match="text()" priority="1">
<xsl:value-of select="normalize-space(.)"/>
</xsl:template>Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com M Balaji wrote: Hi All,
|

Cart



