This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: generic apply-template call
- From: David Carlisle <davidc at nag dot co dot uk>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 17 Jun 2002 18:01:39 +0100
- Subject: Re: [xsl] generic apply-template call
- References: <F101ory46M0G1SFrblG000155de@hotmail.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
> if you have a DTD you could use id() and then you just need to make
> sure that your 2key" attributes are declared ID and have distinct
> values.
If not then it depends what you mean by
> Is there a way to make the use attribuite of xsl:key select a particular
> value? If so, then this could be the droid we are looking for.
you could for example use
<xsl:key name="x" match="*" use="@*"/>
then you could go
<xsl:apply-templates select="key('x','unique.key')"/>
if 'unique.key' is sufficiently unique or, equivalent to what you had
originally you could go
<xsl:apply-templates select="key('x','unique.key')[@key='unique.key']"/>
maybe you don't want @* but something like
<xsl:key name="x" match="*" use="@key|@key-b|@key-c"/>
David
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list