This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How to select a range of elements with offset and length?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]