[bdbxml] order by date
"sarigiannis xaralampos" <hsarigiannis-taE2apzES20Cep0kKqy/[email protected]> Tue, 9 Aug 2005 18:38:42 +0300
| Newsgroups | gmane.comp.db.dbxml.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,
declare function local:lalas($x as element()*) as element()*{ for $y in $x
order by $y/date ascending return
<assessments>{$y}</assessments> };
<blockquote>{ let $i :=local:lalas(//assessment)/assessment
for $l in (2 to 5 ) return <p><a
href='LdRendering.jsp?assessment={data($i[$l ]/id)}'> {data($i[$l ]/title)}
</a><br>author: {data($i[$l ]/author)}</br><br>date: { data($i[$l ]/date)
}</br></p>}</blockquote>
I have this code in order first to order my assessments in asceding mode
related to date and after via the loop to have requested transformations
The strange is that the ordering is not made correctly .I tried the same
syntax to XmlSpy and it worked correctly .
I attach the file over which the query is executed . Any suggestions about
what to change or what I do wrong ????
Thanks
charris
------------------------------------------
To remove yourself from this list, send an
email to [email protected]
Untitled2.xml
(text/xml, 1.5 KB)
<assessments> <assessment> <title>sarakina</title> <id>falutsos.xml</id> <author>Σαρηγιάννης Χαράλαμπος</author> <date>09-08-2005 14:07:52</date> </assessment> <assessment> <title>sarakina</title> <id>fafas.xml</id> <author>Σαρηγιάννης Χαράλαμπος</author> <date>09-08-2005 14:07:24</date> </assessment> <assessment> <title>sarakina</title> <id>mpakas.xml</id> <author>Σαρηγιάννης Χαράλαμπος</author> <date>09-08-2005 14:08:05</date> </assessment> <assessment> <title>sarakina</title> <id>tsutsos.xml</id> <author>Σαρηγιάννης Χαράλαμπος</author> <date>09-08-2005 14:07:38</date> </assessment> <assessment> <title>sarakina</title> <id>malakas.xml</id> <author>Σαρηγιάννης Χαράλαμπος</author> <date>09-08-2005 14:08:18</date> </assessment> <assessment> <title>sarakina</title> <id>kalas.xml</id> <author>Σαρηγιάννης Χαράλαμπος</author> <date>09-08-2005 14:08:31</date> </assessment> <assessment> <title>sarakina</title> <id>rorokas.xml</id> <author>Σαρηγιάννης Χαράλαμπος</author> <date>09-08-2005 14:08:44</date> </assessment> <assessment> <title>sarakina</title> <id>mpartzoka.xml</id> <author>Σαρηγιάννης Χαράλαμπος</author> <date>09-08-2005 14:09:03</date> </assessment> <total>8</total> </assessments>