xsl-list
[Top] [All Lists]

Re: [xsl] key declarations (using a sequence constructor)

2009-10-07 07:23:18
On Tue, Oct 6, 2009 at 6:52 PM, G. Ken Holman
<gkholman(_at_)cranesoftwrights(_dot_)com> wrote:
Every member in your key table has the empty string as the associated key
value, and you are looking up the key value using an empty string.  Thus,
every member of the key table is being returned to you, so you are getting
every attribute.

I hope this helps.

It does, thanks.  So what do people usually do when they want to key
an element on multiple
attributes?  Do they just make a string with some kind of separator
breaking up the attributes?
Isn't there a chance of this failing if the character used for the
separator is used in one or more
of the attributes?

<xsl:key match="name"
              use="string-join((@oid, @parent-oid), '|')"/>

Thanks,
Andy

--~------------------------------------------------------------------
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>
--~--