Nice result.
horrible syntax though:-) How are you supposed to remember where to use ","
where to use ";" and where to let the parser figure out where the
expression ends?
Here's a version that's accepted by saxon's xquery parser and gives the
same result as before
let
$is := $data1/z/y ,
$js := $data2/z/y ,
$ci := count($is),
$cj := count($js)
for $n in (0 to ($ci * $cj -1))
let $i := $is[($n mod $ci)+1],
$j := $js[($n idiv $ci) +1]
order by ($j/@id - $i/@id)
return
concat($i/../@id,$j/../@id)
The xslt expression is exactly the same except (as I commented in the
original note) you can't sneak the variable binding in before
the xsl:sort in the xsl version so the index expressions appear twice.
They could be made into function calls though I suppose which would look
nicer even if they still get evaluated twice.
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--