[xquery-talk] sorting not working

Cindy Girard clm6u at virginia.edu
Thu Nov 17 15:45:30 PST 2005


Hi.

Is there another way I can word this? I'm just not sure where the
error is.

Thanks,
Cindy

-------------------------------------

{for $copies in collection($g:collection)/bad[starts-with(@id , $workid)]/@id
let $bad :=collection($g:collection)/bad[@id = $copies]
let $copyversion := string($bad/@copy),
      $comporder :=$bad[@id = $copies]//compdate[1]/@value,
      $printorder :=$bad[@id = $copies]//printdate[1]/@value,
      $printdate := $bad[@id = $copies]//printdate/text(),
      $repository := $bad//repository/institution/text(),
      $repcount := count($repository)
         order by $copies//compdate[1]/@value, $copies//printdate[1]/@value
return 
if ($copies != $copyid)
then
<option value="{$copies}"><striptags>{if(exists($copyversion))then <wrap>{$copyversion}, </wrap>else ""} {string($printdate)} ({if($repcount = 1) then $repository else <wrap>Multiple ({$repcount}) Institutions</wrap> })</striptags></option>
else "" 

}





More information about the talk mailing list