Re: [xsl] creating attribute for xsl:element in applied template

Subject: Re: [xsl] creating attribute for xsl:element in applied template
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Mon, 21 Jul 2008 14:38:01 +0200 (CEST)
christoph.naber@xxxxxxxxxxx wrote:

  Hi

> <xsl:template match="/xs:schema/xs:element[@name]" >
>         <xsl:element name="{@name}">
>                 <xsl:apply-templates />
>         </xsl:element>
> </xsl:template>

  This apply templates for text nodes too.  So text nodes are added to
the element before any attribute.  You can either strip the withespace
text nodes in the input or selectively apply templates only to child
element nodes.

  Regards,

--drkm




















      _____________________________________________________________________________ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr

Current Thread