Re: Not grokking keys...

Subject: Re: Not grokking keys...
From: Guy_Murphy@xxxxxxxxxx
Date: Thu, 22 Apr 1999 15:18:27 +0100
Thanks James.

Phew, I got there.

Your talking in terms of a table did it for me. I've printed this off so I
can read it again if/when I loose it.

What a novel idea. I'm suprised it suddenly sprang up in the draft. I can
understand the need for the first part, being able to name a collection for
further reference (what struck me as classing). Can you shed any light on
the problem domain that the second bit, indexing by another "class"
instance value is supposed to address?..... in short, why a table?

Thanks heaps for your patience in dealing with this matter James, it's much
appreciated.

Cheers
     Guy.





xsl-list@xxxxxxxxxxxxxxxx on 04/23/99 03:54:57 AM

To:   xsl-list@xxxxxxxxxxxxxxxx
cc:    (bcc: Guy Murphy/UK/MAID)
Subject:  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






 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread