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

How to select a range of elements with offset and leng

Subject: How to select a range of elements with offset and length?
From: Sreeni Chippada <sreeni@xxxxxxxxx>
Date: Mon, 8 Apr 2002 13:05:04 -0400
select range using offset
Hi,
	I am trying to select a range of elements using an offset and
length.
	For example in the following xml,

		<a>
		  <b>
			<item>1</item>
			<item>45</item>
			<item>1</item>
			<item>200</item>
			<item>KKK</item>
			<item>23</item>
			<item>1</item>
			<item>1</item>
			<item>200</item>
			<item>100</item>
		   </b>
		</a>

	if I want to select elements from 3 to 7, what is the xpath
expression?

	I know I can get to the element 3 using the following template.

	<xsl:template match="b">
		<xsl:for-each select="item[3]" >
		.
		.
		.
		</xsl:for-each>
	</xsl:template>

	I need help selecting elements with the offset of 3 and length of 4

	Appreciate any help.

Thanks,
Sreeni

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.