Hi,
The code is looking for the path "c01/c02/did/unittitle"
within a unittitle. Your for-each statement puts you in the context of
the unittitle.
The only case in which it would pick something up is if it you had the tree:
unittitle/c01/c02/did/unittitle
in your document
Try
<xsl:for-each select="c02">
<xsl:value-of select="did/unittitle"/>
(depending on the context of your for-each statement it might be
select=".//c02" or select="//c02")
Liz Shaw
Amy Stout wrote:
> Hi,
>
> I'm having a for-each problem. In this case, the XML looks
> fine, but the XSLT is not picking up the data. I tried
> adding the <tbody> tag but it didn't help. My XSLT code
> looks like this:
>
> **************************
>
> <table border="1" cellpadding="5">
>
> <tr>
> <th>Folder Title</th>
> <th>Folder Date Range</th>
> <th>Box Number</th>
> <th>Folder Number</th>
> </tr>
>
> <xsl:for-each select="unittitle">
> <tr>
> <td><xsl:value-of
> select="c01/c02/did/unittitle"/></td>
> <td><xsl:value-of
> select="c01/c02/did/unitdate"/></td>
> <td><xsl:value-of
> select="c01/c02/did/container[1]"/></td>
> <td><xsl:value-of
> select="c01/c02/did/container[2]"/></td>
> </tr>
> </xsl:for-each>
>
> </table>
>
> ******************************
>
> I would appreciate any help!
>
> Thank you,
> Amy
|