Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

nested for-each in xsl

Status
Not open for further replies.

davikokar

Technical User
May 13, 2004
523
IT
hallo,

I don't understand why this doesn't work:

xsl
Code:
...
    <xsl:for-each select="table/row">
      <tr class="row">
        <xsl:for-each select="table/row/column">
          <td class="cell">
            <span>
              <xsl:value-of select="column"/>
            </span>
          </td>
        </xsl:for-each>
      </tr>
    </xsl:for-each>
...

xml
Code:
<table>
 <row>
  <column>test</column>
  <column>test</column>
  <column>test</column>
 </row>
 <row>
  <column>test</column>
  <column>test</column>
  <column>test</column>
 </row>
 <row>
  <column>test</column>
  <column>test</column>
  <column>test</column>
 </row>
</table>

Does someone see something wrong?
Thanks
 
[tt] <xsl:for-each select="table/row">
<tr class="row">
<xsl:for-each select="[red]column[/red]">
<td class="cell">
<span>
<xsl:value-of select="[red].[/red]"/>
</span>
</td>
</xsl:for-each>
</tr>
</xsl:for-each>[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top