[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Not grokking keys...

Subject: Re: Not grokking keys...
From: James Clark <jjc@xxxxxxxxxx>
Date: Thu, 22 Apr 1999 19:54:57 +0700
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.