|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: order-by vs xsl:sort
> Not really. It models it as a sequence of integers of length M*N and > calculates the sort key (and data needed for the result) by > calculating > the equivalent indexes into the original sequences using mod and idiv. > > given the general 2 variable case: > > > for $i in $is, $j in $js > order by f($i,$j) > return > g($i,$j) > > for some functions f and g then I think you can always replace this by > > let $ci :=count($is) return > let $cj :=count($js) return > for $n in (0 to $ci * $cj) > let $i :=$is[$n mod $ci)+1] > let $j := $js[($n idiv $ci) +1] > order by f($i, $j) > return > g($i,$j) > > and once you have just a single for and order by, converting > that to xsl > for-each and sort is just syntax. > Nice result. Perhaps I can get rid of those horrible tuples in my implementation! Michael Kay http://www.saxonica.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








