[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Re: xsl:key composite keys


Subject: [xsl] Re: xsl:key composite keys
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Mon, 10 Nov 2003 19:32:34 +0100

This could probably make sense if you had provided a complete source xml
document.

> <xsl:key name="Personkey" match="//Metadata/Person"

I don't see any Metadata or Person elements.

> use="MetadataID/LocalID"/>

and no LocalID elements either ...


Not to speak about "somewhere/someID"


=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL



"Latham, SE (Sue) " <S.E.Latham@xxxxxxxx> wrote in message
news:49F73BEED865D3119F8700902773C9F9035F40D2@xxxxxxxxxxxxxxxxxxxxxx
> 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



Current Thread
Keywords
xml