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

Re: key declarations (using a sequence constructor)

Subject: Re: key declarations (using a sequence constructor)
From: Andy Chambers <achambers.home@xxxxxxxxxxxxxx>
Date: Wed, 7 Oct 2009 12:22:47 +0100
Re:  key declarations (using a sequence constructor)
On Tue, Oct 6, 2009 at 6:52 PM, G. Ken Holman
<gkholman@xxxxxxxxxxxxxxxxxxxx> 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

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.