This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: preceding-sibling
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] preceding-sibling
- From: "Borca, Olivier" <Olivier dot Borca at softplumbers dot com>
- Date: Tue, 13 Mar 2001 12:28:46 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
- Thread-Index: AcCrsEIwCt1FlZOySoeCkxA6woJ5NwAACROg
- Thread-Topic: [xsl] preceding-sibling
Thx for your answer,
your answer is what I meant but I made a mistake in the mail :)
Anyway, I can't make it work ... and I don't understand why.
<xsl:when
test="@type='{preceding-sibling::element[position()=1]/@type}ValueMap'">
This is exactly what I'm tryin to do.
I test the value of the 'type' attribute of the current node compared to
the value of the 'type' attribute of the preceding node concatenated
with "ValueMap".
But it doesnt work ...
-----Original Message-----
From: Michael Kay [mailto:mhkay@iclway.co.uk]
Sent: Tuesday, March 13, 2001 11:39 AM
To: xsl-list@lists.mulberrytech.com
Subject: RE: [xsl] preceding-sibling
> <xsl:element name="{preceding-sibling::foo[position()=1]/@type}" />
>
> isn't that supposed to create a 'foo' element which has the
> name of the
> 'type' attribute of the previous 'foo' element ?
No, it's supposed to create an element which has the
name of the 'type' attribute of the previous 'foo' element.
> It doesn't work and I took from the W3C site...
Perhaps a context problem?
Mike Kay
Software AG
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list