[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: FW: Siblings

Subject: RE: FW: Siblings
From: "Arun Sinha" <arunsinha666@xxxxxxxxxxx>
Date: Tue, 14 Dec 2004 07:13:36 +0000
free download bharat matrimony messenger
Hi,


From: "Karl Stubsjoen" <karl@xxxxxxxxxxxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: FW:  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@xxxxxxxxxxxxxxxxxxxx]
Sent: Tuesday, December 14, 2004 11:49 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  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[@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.


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.