This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

getting parents position


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]