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

Re: Compound Keys Problem.

Subject: Re: Compound Keys Problem.
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Fri, 12 Jan 2001 09:26:18 +0000
compound key
Hi Bill,

> How do I extend the above if I want to return on the CLIENT_ID
> attribute and a SEQ_NBR Attribute on the element 
> CLIENT_ADDRESS_COMPOSITE.

You can do this by making the key hold key values that are
combinations of the CLIENT_ID and SEQ_NBR attributes.  The usual way
of doing this is through the concat() function:

<xsl:key name="giveCompositeAddressDetails"
         match="CLIENT_ADDRESS_COMPOSITE"
         use="concat(@CLIENT_ID, ' ', @SEQ_NBR)"/>

<xsl:variable name="GiveCompositeDetails"
              select="key('giveCompositeAddressDetails',
                          concat($GiveClientDetails/@CLIENT_ID, ' ',
                                 $GiveClientDetails/@SEQ_NBR))"/>

Naturally, you should use a separator that doesn't appear in the
@CLIENT_ID to ensure that the @CLIENT_ID and @SEQ_NBR don't combine in
non-unique ways.

I hope that helps,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



 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.