You've shown some code that doesn't work, but you haven't shown your input
or your desired output, so it's hard to see what you're trying to achieve.
Regards,
Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay
-----Original Message-----
From: Dick Penny [mailto:d_penny(_at_)usa(_dot_)net]
Sent: 07 August 2009 00:08
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Dynamic attribute name in predicate
As a newbie, I've had reasonable success with help from this
group. Now I am stretching my wings a bit and trying MK's
"convenience lists" to drive my transformation. I can't
figure out how to also use an attribute name from convenience
list D1 as well as it value.
=========working snippet start
<xsl:variable name="allRows" select="/dsQueryResponse/Rows/Row"/>
<xsl:variable name="D1">
<GroupAssigned>CRA</GroupAssigned>
<GroupAssigned>HR</GroupAssigned>
<GroupAssigned>Legal</GroupAssigned>
</xsl:variable>
<xsl:template match="/">
<table class="newStyle1">
<xsl:for-each select="msxsl:node-set($D1)/GroupAssigned">
<tr>
<td><xsl:value-of select="." /></td>
<xsl:variable name="d1" select="."/>
<xsl:variable name="d1Rows" select="$allRows[(_at_)GroupAssigned=$d1]"/>
=========working snippet end
None of next three work, I thought they would. I guess I
don't understand the syntax as well as I thought.
<xsl:variable name="d1Rows" select="$allRows[(_at_)name()=$d1]"/>
<xsl:variable name="d1Rows" select="$allRows[(_at_)local-name()=$d1]"/>
<xsl:variable name="d1Rows" select="$allRows[(_at_)GroupAssigned=(_dot_)]"/>
Dick Penny
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--