This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: current()
- From: Jörg Heinicke <joerg dot heinicke at gmx dot de>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 28 Nov 2001 01:35:59 +0100
- Subject: Re: [xsl] current()
- References: <003501c1779d$c40c8450$acc469d5@pcukmka>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Thanks, I found the correct version:
select="inst[not(@inst-src=preceding-sibling::inst/@inst-src)]"
I had a completely wrong conception of current() - only because of the bug
in Xalan til version 2.2.D9. After upgrading it my stylesheet didn't work
anymore.
Regards,
Joerg
----- Original Message -----
From: "Michael Kay" <michael.h.kay@ntlworld.com>
To: <xsl-list@lists.mulberrytech.com>
Sent: Wednesday, November 28, 2001 12:46 AM
Subject: RE: [xsl] current()
> > My XML:
> >
> > <cluster>
> > <inst machine="test1.virbus.de" inst-src="srctest"/>
> > <inst machine="test2.virbus.de" inst-src="srctest2"/>
> > <inst machine="test3.virbus.de" inst-src="srctest"/>
> > </cluster>
> >
> > My XSL:
> >
> > <xsl:template match="cluster">
> > <xsl:apply-templates
> > select="inst[not(preceding-sibling::inst[@inst-src=current()/@
> > inst-src])]"/>
> > </xsl:template>
>
> current() will return a <cluster> element, which does not have an
@inst-src
> attribute.
>
> Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list