xsl-list
[Top] [All Lists]

Re: Beginner-Problem

2002-11-22 04:42:19
Hi sorin,

How to make that work? I tried this:

<xsl:template match="/">
 <xsl:for-each select="/energyreport/energyconsumption">
    <xsl:value-of select="@year"/>
</xsl:for-each>
</xsl:template>

That gives out the years, that's fine... but how to select the energy-attribute (only once each)?

Using your approach, I would put in

<xsl:for-each select="terajoule">
   <xsl:value-of select="@energy"/>
</xsl:for-each>

inside the other for-each loop.

Sincerely
Ragulf Pickaxe :)

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus


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



<Prev in Thread] Current Thread [Next in Thread>
  • Re: Beginner-Problem, Ragulf Pickaxe <=