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]

string-length


I am trying to determine set a variable according to the length of a string.

say i have 5 nodes

I want to select all nodes (in order) as long as the additive string length
is less then 915

ie:
node 1 = 300
node 2 = 200
node 3 = 300
node 4 = 300
node 5 = 100

i would select nodes 1, 2, 3(because if i add node 4 the total would be
1100, so i have to stick with the first three nodes)

My XML has a structure
<CATEGORY>
	<DATA>
		....
	</DATA>


	<DATA>
		....
	</DATA>


	<DATA>
		....
	</DATA>


	<DATA>
		....
	</DATA>


	<DATA>
		....
	</DATA>

</CATEGORY>


My XSL template is at match="CATEGORY"

ANy suggestions on an efficient solution?


 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]