Re: [xsl] Same name Elements in more than one node

Subject: Re: [xsl] Same name Elements in more than one node
From: Mike Ferrando <mikeferrando@xxxxxxxxx>
Date: Wed, 26 Dec 2001 09:49:33 -0800 (PST)
--- Oleg Tkachenko <olegt@xxxxxxxxxxxxx> wrote:
> The current node is CO2 and it doesn't have ENCODINGANALOG
> attribute, so 
> result of this instruction is empty string.

Oleg,
Thanks, I see that (Duh!). I figured that part out. The problem is
that I want to get the ENCODINGANALOG attribute for each PERSNAME
element I output. Since I cannot figure out how to write for the
current node PERSNAME for an instance of two PERSNAME elements, 

<xsl:value-of select="./PESNAME[2]"/>
<xsl:value-of select="./@ENCODINGANALOG[2]"/>

then I decided to write two for-each statements, one inside another,
to take care of it. It is clumsy and awkward and very very
frustrating, but it works (below).

Mike F.

<xsl:for-each select="//C02">
  <TR>
    <xsl:for-each select="./DID/UNITTITLE/PERSNAME">
      <TD>
        <FONT size="+3">
          <xsl:value-of select="."/>
        </FONT>
        <xsl:text>&#x20;&#x20;&#x20;&#x20;&#x20;:&#x20;</xsl:text>
          <xsl:value-of select="./@ENCODINGANALOG"/>
      </TD>
    </xsl:for-each>
  </TR>
</xsl:for-each>


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

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


Current Thread