[bdbxml] order with metadata

"sarigiannis xaralampos" <hsarigiannis-taE2apzES20Cep0kKqy/[email protected]> Thu, 4 Aug 2005 18:10:42 +0300
Newsgroups gmane.comp.db.dbxml.general
Message-ID <[email protected]>
Hi, I want to to order my docs on desceding and ascending date and
alphabically by the the author .

In order to do this I use dbxml metadata .

xmlDoc.setMetaData("http://metadata","date",new
XmlValue(theDate.toString()));

xmlDoc.setMetaData("http://metadata","author",new XmlValue(author));

 

I try

for $i in collection('LD.dbxml')//imsld:learning-design/imsld:title/text()
order by xs:string($i[dbxml:metadata('md:author')]) ascending  return $i 

---- for taking the titles of my files ordered alphabically by authors name 

 

for $i in collection('LD.dbxml')//imsld:learning-design/ imsld:title/text()
order by xs:dateTime($i[dbxml:metadata('md:date')]) ascending  return $i

  --for taking the titles  from the newest to the oldest 

 

None of these works properly  Any suggestions ??

Thanks charris