xsl-list
[Top] [All Lists]

Re: [xsl] Insert new element depending on value of attribute

2008-02-18 11:27:32
Gerhard Glatz wrote:

Does anybody have a hint, where and how I should add something like
<xsl:if test="multipart/@attribute=desired_value"> ??

I think you want e.g.
<xsl:template match="disk/tracks[track[multipart[(_at_)attribute = 'value']]]">
     <xsl:copy>
       <xsl:apply-templates select="@* | node()">
       <track>
         <length>
           <xsl:value-of select="select-what-you-need-here"/>
         </length>
       </track>
     </xsl:copy>
  </xsl:template>
plus the identity transformation template.




--

        Martin Honnen
        http://JavaScript.FAQTs.com/

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

<Prev in Thread] Current Thread [Next in Thread>