Re: [xsl] How to copy xml which attributes are processed with normalize-space function

Subject: Re: [xsl] How to copy xml which attributes are processed with normalize-space function
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 19 Apr 2001 09:27:12 +0100
<xsl:template match="list">
  <list>
    <xsl:apply-templates select="@*|node()"/>
  </list>
</xsl:apply-templates>


<xsl:template match="list/@*">  <!-- or just @* if you want to do this
                                     on other elements as well) -->
  <xsl:attribute name="{name()}">
    <xsl:value-of select="normalize-space(.)"/>
  </xsl:attribute>
</xsl:template>

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread