Thanks a lot Mary.

That worked for my use case.


-----Original Message-----
From: Mary Holstege [mailto:mary.holst...@marklogic.com]
Sent: Mon 7/2/2012 8:00 PM
To: general@developer.marklogic.com; Bodireddy, Gnanaprakash (Cognizant)
Subject: Re: [MarkLogic Dev General] Sorting untypedAtomic Datatypes

Another alternative is to use a numeric collation:

let $data := document {
<standards>
  <standard>SC.3.P</standard>
  <standard>SC.3.P.10</standard>
  <standard>SC.3.P.10.2</standard>
  <standard>SC.3.P.11</standard>
  <standard>SC.3.P.11.1</standard>
  <standard>SC.3.P.8</standard>
  <standard>SC.3.P.8.3</standard>
  <standard>SC.3.P.9</standard>
  <standard>SC.3.P.9.1</standard>
</standards> }
for $each in $data//standard
order by $each collation "http://marklogic.com/collation//MO";
return $each;

//Mary

mary.holst...@marklogic.com
Principal Engineer
MarkLogic Corporation


This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding, printing 
or copying of this email or any action taken in reliance on this e-mail is 
strictly prohibited and may be unlawful.
_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to