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

RE: xsl:key composite keys

Subject: RE: xsl:key composite keys
From: "Latham, SE (Sue) " <S.E.Latham@xxxxxxxx>
Date: Wed, 12 Nov 2003 10:06:20 -0000
composite key
Thanks very much Michael and David Carlisle for your suggestion. It works a
treat.

Cheers,
Sue Latham

> -----Original Message-----
> From: Michael Kay [mailto:mhk@xxxxxxxxx]
> Sent: 10 November 2003 19:11
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE:  xsl:key composite keys
> 
> You can define a composite key using concat() with a suitable separator.
> 
> Michael Kay
> 
> > -----Original Message-----
> > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
> > Latham, SE (Sue)
> > Sent: 10 November 2003 17:29
> > To: 'XSL-List@xxxxxxxxxxxxxxxxxxxxxx'
> > Subject:  xsl:key composite keys
> >
> >
> > I am performing xml-to-xml transformations(XSLT/XPATH V1.0)
> > using xsl:key definitions to cross-refer within a document.
> > Is it possible to define composite keys using xsl:key? For
> > example I can define a key thus:-
> > <xsl:key name="Personkey" match="//Metadata/Person"
> > use="MetadataID/LocalID"/> Where the MetadataID part of the
> > document looks like this:- <MetadataID>
> > 	<ServerID>server1</ServerID>
> > 	<PersonID>Person1</PersonID>
> > </MetadataID>
> > Which I can then use OK like this:-
> > <xsl:variable name="Pkey"  select="somewhere/someID"/>
> > <xsl:for-each select="key('Personkey', $Pkey)"> ... do something...
> >
> > But what I really want is the key to use eveything under
> > 'MetadataID'. So the key would be the concatenation of
> > ServerID & LocalID. e.g. in the case above a string "server1Person1".
> >
> > Is this possible in XSLT/XPATH version 1.0? Will it be
> > possible in version 2.0?
> >
> > Regards,
> > Sue Latham
> > -----------
> >
> >
> >  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> >
> 
> 
>  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

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.