This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: RE: untitled from Biray Giray: colour on first occurrence of an a ttribute value.
- From: Joerg Heinicke <joerg dot heinicke at gmx dot de>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 17 Apr 2002 16:39:27 +0200
- Subject: Re: [xsl] RE: untitled from Biray Giray: colour on first occurrence of an a ttribute value.
- References: <9723092BA4DBD111816D0000F6B093610C27E776@imsuklndsx1.lnd.uk.imshealth.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Tom,
I see now, that you already have to test whether the current node is in
the key-table ... and that your code is correct then.
The difference between your "overkill"-solution and the Muenchian Method
is a "[1]" at the end of the key().
So
count( . | key('firsts', @ContentText)[1] ) = 1
is "pure" Muenchian Method (with the much easier <xsl:key/>).
Sorry for the inconvenience. Once again I wrote and sent a mail faster
than I can read and think ;-)
Joerg
TSchutzerWeissmann@uk.imshealth.com wrote:
> Hi Joerg,
>
> Thanks for pointing out that the key was a bit of an overkill. The only
> thing that I didn't understand was this:
>
>>With your key you only have these nodes in your key-table, which are the
>>first with its attribute value. So you would not need the Muenchian
>>Method itself:
>>
>>
>>><xsl:when test="(count(. | key('firsts',@ContentText)) = 1)">
>>
>>An easy key('firsts',@contentText) would be enough.
>
>
> Are you saying that I can use this: test = "key('firsts',@ContentText)" -
> because I don't understand how that will know whether the node I'm looking
> at is the same as the one in the key, or another one with the same
> ContentText value?
>
> Regards,
> Tom
--
System Development
VIRBUS AG
Fon +49(0)341-979-7419
Fax +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list