xsl-list
[Top] [All Lists]

RE: FW: Siblings

2004-12-14 00:13:36

Hi,


From: "Karl Stubsjoen" <karl(_at_)meetscoresonline(_dot_)com>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject: FW: [xsl] Siblings
Date: Tue, 14 Dec 2004 11:53:58 -0700

Woops, correction to 2nd "IF the offset were" result below:  should result
in "GRAPE", corrected with [GRAPE] below.

-----Original Message-----
From: Karl Stubsjoen [mailto:karl(_at_)meetscoresonline(_dot_)com]
Sent: Tuesday, December 14, 2004 11:49 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Siblings


I need to offset a sibling match for an offset of X.  Example:

<elements>
<element item="1">APPLE</element>
<element item="2">ORANGE</element>
<element item="3">GRAPE</element>
<element item="4">WATERMELON</element>
<element item="5">CRANBERRY</element>
</elements>

If the offset were 0, then the result would be "APPLE", if the offse were 2,
then the result would be "ORANGE" -correction- [GRAPE].

Well, corrected here.


The template is always applied in order of the item, but the look up is
based on this offset value.

So, the big challenge: if the current item was 5 and the offset was 2, then
the result would be "ORANGE".

What about the above. Shouldn't it be "GRAPE" as well?

I am not sure whether I have understood it clearly, but what about
using the following :-

<xsl:value-of select="/elements/element[(_at_)item = ($offset+1)]" />

Cheers.

Arun

_________________________________________________________________
Chat with 1000s of singles. http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Let BharatMatrimony.com's Instant Messenger show you how.


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>