This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: key definition
- To: XSL List <xsl-list at lists dot mulberrytech dot com>
- Subject: Re: [xsl] key definition
- From: Joerg Pietschmann <joerg dot pietschmann at zkb dot ch>
- Date: Mon, 29 Oct 2001 12:40:15 +0100
- Organization: ZKB
- Reply-To: xsl-list at lists dot mulberrytech dot com
"Steve Renshaw" <renshaw_steve@hotmail.com> wrote:
> Second question: What happens if I encounter markup that looks like
> this:
> <item>
> <data id="1">01</data>
> <data id="10">1</data>
> </item>
> in which case the usage of concat($id,$value) aliases into "101"
The usual trick is concat($id,':',$value) and a similar phrase in your
key, with a character for ':' which can't appear in either value or
is at least selected to avoid aliasing (sometimes, it is called the
guard character). You can of course substitute a longer string for ':'
to make aliasing more unlikely. Apart from this, XSLT is indeed
lacking a really robust mechanism for building keys from compositions.
HTH
J.Pietschmann
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list