|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: RE: Forming a Tree
> Hi Michael,
> Thanks for the response. I am new to XSL and I never used xsl:key,
> could you pl help me, how to write the xsl:key for
> <xsl:for-each select="//row[@ParentTopicId=@TopicId and
> @BookId=$node1/@BookId and @TopicTitle]">. In xsl:for-each i
> am using a variable, i am not getting how to
> write xsl:key.
>
The variable part of that expression is @BookId.
So
<xsl:key name="k"
match="row[@ParentTopicId=@TopicId and @TopicTitle]"
use="@BookId"/>
then
<xsl:for-each select="key('k', $node1/@BookId)">
The key indexes all the rows that satisfy the "fixed" conditions by the
value of their @BookId. The select expression finds entries in that
index by supplying the required BookId.
Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








