Re: [xsl] Problem retaining HTML tags during XSL transformation

Subject: Re: [xsl] Problem retaining HTML tags during XSL transformation
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Wed, 10 Jan 2007 20:47:17 +0100
Abel Braaksma wrote:
     <!-- matches text nodes without newline -->
   <xsl:template match="text()[not(contains(., '&#10;'))]">
       <xsl:value-of select="normalize-space(.)"/>
   </xsl:template>


This is better written as follows, to prevent ambiguity and to let it perform as "catch-all" without added complexity.

   <!-- matches text nodes without newline -->
   <xsl:template match="text()">
       <xsl:value-of select="normalize-space(.)"/>
   </xsl:template>

Current Thread