This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
getting parents position
- To: xsl-list at mulberrytech dot com
- Subject: getting parents position
- From: "Mirick, John" <jmirick at doghouse dot com>
- Date: Tue, 7 Nov 2000 15:02:07 -0500
- Reply-To: xsl-list at mulberrytech dot com
Hey there...
Easy question and Im sure it is somewhere in the FAQ (I just havent been
able to track it down).
Question is in the code..
<xsl:template match="dh:row">
<tr>
<xsl:for-each select="dh:data">
<xsl:call-template name="tableCell">
<xsl:with-param name="cellData"><xsl:value-of
select="."/></xsl:with-param>
</xsl:call-template>
</xsl:for-each>
</tr>
</xsl:template>
<xsl:template name="tableCell">
<xsl:choose>
<!-- ???
every other row should be shaded... this isnt right. Basicly I need the
syntax for getting the value of a parents position()
???-->
<xsl:when test="parent[position() mod 2 = 0]">
<td class="tableshadedRow"><xsl:value-of
select="parent" /><xsl:value-of select="$cellData" /></td>
</xsl:when>
<xsl:otherwise>
<td><xsl:value-of select="$cellData" /></td>
</xsl:otherwise>
</xsl:choose>
Im new at this and pretty baffled right now. Thanks for the help.
John
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list