Re: [xsl] CLARIFICATION - Selectively convert subordinate elements to text

Subject: Re: [xsl] CLARIFICATION - Selectively convert subordinate elements to text
From: Florent Georges <darkman_spam@xxxxxxxx>
Date: Fri, 25 May 2007 11:16:46 +0200 (CEST)
Darren Wheatley wrote:

  Hi

> The added ripple here is that I have other instances of
> these elements that I want to process rather than just
> convert to text

  Use a mode then:

<xsl:template match="widget">
  <xsl:copy>
    <xsl:apply-templates select="node()" mode="widget-to-text"/>
  </xsl:copy>
</xsl:template>

<xsl:template match="*|text()" mode="widget-to-text">
  <xsl:value-of select="."/>
</xsl:template>

<xsl:template match="HIDDEN" mode="widget-to-text">
  <xsl:copy-of select="."/>
</xsl:template>

  Regards,

--drkm





















      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

Current Thread