[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Not grokking keys...
Guy_Murphy@xxxxxxxxxx wrote: > Thanks for addressing this.... > > I'm almost there I think. The problem I face is it still looks like > defining classes to me, I'm sure I'm only following you half-way. > > <xsl:key name="titles" match="div" use="title"/> > > The match="div" gets a collection together of div elements, Right you've got a table of all the div elements. > and we can now > refer to that collection as titles as defined name="titles". > > What I'm still not grasping is use="title" The table is indexed by the title children: I can retrieve a div from the table using the value of the title child of the div element. The table of div elements indexed by their titles is named "titles". > And with keyref('titles', .) what's the second param got to do with > anything? The second param says that you use the value of the current element to look up the div element that you are trying to find. If you instead had <divref ref="Expressions"/> you would instead use keyref('titles', @ref) James 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
|