[xsl] Sorting Nested Loops

Subject: [xsl] Sorting Nested Loops
From: "Tyler Queen" <xmllist@xxxxxxxxxxxx>
Date: Tue, 09 Jul 2002 12:19:09 -0700 (PDT)
I posted this question earlier, but I did'nt include
enough info. I hope this helps. I am having trouble
getting the desired results when I try to sort by an
attribute in a nested loop. I want to sort by the
sequence attribute in ascending order. I get them back
in this order

1, 7, 8, 14, 3, 4, 9, 10, 5, 6, 11, 12, 2, 13

Any ideas?

This is the xml

<?xml version="1.0" encoding="iso-8859-1" ?>
<leadsite>
	<tabs>
		<tab typeid="" sequence="1" active="1">
			<label>Tab 1</label>
			<url>/controlcenter/applications/frog.asp?aid=12&amp;fid=123</url>
		</tab>
		<tab typeid="" sequence="14" active="1">
			<label>Tab 14</label>
			<url>/controlcenter/applications/tyler.asp</url>
		</tab>
	</tabs>
</leadsite>

This is the xsl

	<tabs>

		<tab typeid="" sequence="1" active="1">
			<label>Tab 1</label>
			<url></url>
		</tab>
		<tab typeid="" sequence="14" active="1">
			<label>Tab 14</label>
			<url></url>
		</tab>

				<tab typeid="" sequence="7" active="1">
			<label>Tab 7</label>
			<url></url>
		</tab>
		<tab typeid="" sequence="8" active="1">
			<label>Tab 8</label>
			<url></url>
		</tab>
				<tab typeid="" sequence="10" active="1">
			<label>Tab 10</label>
			<url></url>
		</tab>
		<tab typeid="" sequence="9" active="1">
			<label>Tab 9</label>
			<url></url>
		</tab>
		<tab typeid="" sequence="3" active="">
			<label>Tab 3</label>
			<url></url>
		</tab>
		<tab typeid="" sequence="4" active="1">
			<label>Tab 4</label>
			<url></url>
		</tab>
				<tab typeid="" sequence="5" active="1">
			<label>Tab 5</label>
			<url>/controlcenter/applications/tyler.asp</url>
		</tab>
		<tab typeid="" sequence="6" active="1">
			<label>Tab 6</label>
			<url></url>
		</tab>
				<tab typeid="" sequence="12" active="1">
			<label>Tab 12</label>
			<url>/controlcenter/applications/tyler.asp</url>
		</tab>
		<tab typeid="" sequence="11" active="1">
			<label>Tab 11</label>
			<url></url>
		</tab>
				<tab typeid="" sequence="13" active="1">
			<label>Tab 13</label>
			<url></url>
		</tab>
		<tab typeid="" sequence="2" active="1">
			<label>Tab 2</label>
			<url></url>
		</tab>
	</tabs>

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


Current Thread