My question was more to do with the pattern Joris used, i.e. generate-id((..
| preceding-sibling::hr)[last()]).
I understand the generate-id() function but was not entirely sure what the
pattern itself was doing.
Paul
-----Original Message-----
From: Michael Kay [mailto:mike(_at_)saxonica(_dot_)com]
Sent: 16 February 2005 13:24
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] FW: Dealing with mixed content
Being new to XSLT I'm a little unsure of exactly what the pattern in
the 'use' attribute value in the xsl:key element is doing.
If you want to index all employees by their works number, you do
<xsl:key name="k" match="employee" use="works-number"/>
and then to find an employee with works number 517541 you do
key('k', '517541')
The use attribute can be any XPath expression, so if you want to index
employees on the number of events they have in their promotion history, you
can do
<xsl:key name="k" match="employee" use="count(promotion-history/event)"/>
and then
key('k', 3)
will find all employees with three such events.
Michael Kay
http://www.saxonica.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>
--~--
--~------------------------------------------------------------------
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>
--~--