xsl-list
[Top] [All Lists]

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

2007-01-10 12:48:48
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>


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