Hi Jay and other knowledgeable people,
With Jay's help I have been able to output all the data I needed into
a table structure. Thanks Jay. Now that it is displaying all the data
though it displays it all at once. I need it to show one item at a
time and then move on to the next one.
Example:
<tr>
<td><xsl:apply-templates select="staffOffice/Office/dptFull"/></td>
</tr>
<tr>
<td><xsl:apply-templates select="staffOffice/Office/Location"/></td>
<td><xsl:apply-templates select="staffOffice/Office/Phone"/></td>
</tr>
<tr>
<td><xsl:apply-templates select="staffPersonal/Person/lName"/>
<xsl:text>,</xsl:text>
<xsl:apply-templates
select="staffPersonal/Person/fName"/>
</td>
<td><xsl:apply-templates select="staffTitle/Position/Phone"/></td>
</tr>
<tr>
<td><xsl:apply-templates select="staffOffice/Office/dptFull"/></td>
</tr>
<tr>
<td><xsl:apply-templates select="staffOffice/Office/Location"/></td>
<td><xsl:apply-templates select="staffOffice/Office/Phone"/></td>
</tr>
<tr>
<td><xsl:apply-templates select="staffPersonal/Person/lName"/>
<xsl:text>,</xsl:text>
<xsl:apply-templates
select="staffPersonal/Person/fName"/>
</td>
<td><xsl:apply-templates select="staffTitle/Position/Phone"/></td>
</tr>
From other programming experiences this looks like an ideal candidate
for recursion. If I changed the code to something like this
<tr>
<td><xsl:value-of select="dptFull"/></td>
</tr>
<tr>
<td><xsl:value-of select="staffOffice/Office/Location"/></td>
<td><xsl:value-of select="staffTitle/Position/phone"/></td>
</tr>
<tr>
how do I chose the next dptFull element in the tree to be displayed? I
have been also reading a couple of XSLT books and this seems a bit
like the Grouping that Jay mentioned but grouping seems to general for
my case. So in summary what I am looking to do is to take
<tr>
<td><xsl:value-of select="dptFull"/></td>
</tr>
<tr>
<td><xsl:value-of select="staffOffice/Office/Location"/></td>
<td><xsl:value-of select="staffTitle/Position/phone"/></td>
</tr>
<tr>
and repeat it over and over until all nodes have been selected and
traversed. What is the preferred way to this?
Thanks again everyone,
Max Bronsema
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--