ADO, XML accessing a parent node's row context from a child

wxdqz

New Member
Hi AllExtract of style sheet, I do not seem to understand how to refernce a parentnode when I processing theinner <xsl:for-each select='@*'>, I want to fill the HREf with the orderIDthat is in the <xsl:for-each select='z:row'>outer loop I thought that preceeding a filter with ".." allow access to theparent node values eg.<xsl:value-of select="..['@OrderID']" /> would return in the current rowcontext the value of the orderidassociated with the "OrderNUmber"<xsl:template match="xml/rs:data"><xsl:for-each select='z:row'><tr><xsl:for-each select='@*'><td nowrap="nowrap" class='Cell'><xsl:choose><xsl:when test=".[nodeName()='OrderNumber']"><a><xsl:attribute name="HREF">Order.asp?OrderID=<xsl:value-ofselect="..['@OrderID']" /></xsl:attribute><xsl:value-of match='.'/></a></xsl:when></xsl:choose></td></xsl:for-each></tr></xsl:for-each></xsl:template>Extract of xml ado data looks like<rs:data><z:row OrderNumber='71826' OrderID='71826' ...bunch of other fields /></rs:data></xml>
 
Back
Top