Looks to me like you have a context problem with your for-each statement.
As it reads, c01/c02/did/unittitle, c01/c02/did/unitdate, c01/c02/did/container[1], and c01/c02/did/container[2] would all have to be children of the <unittitle> selected in the for-each statement.
I doubt that this is what you want to express.
It's problematic to suggest an alternative without knowing what the markup is that you are processing and the rest of the template of which this is a part looks like. For example, what is the match statement? Also, is <unitdate> a child of <unittitle> or <did>?
Michael
-----Original Message-----
From: Encoded Archival Description List [mailto:[log in to unmask]]On Behalf Of
Amy Stout
Sent: Friday, March 11, 2005 8:37 AM
To: [log in to unmask]
Subject: for-each question
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
|