Hi ,
 
I would like to sort a squence of items in alphabetical order with high 
precedence to capital case letters. 

 
For example
 
let $sequence := ("PROFESSIONAL", "Technical", "Biographies", "Literature" , 
"TRAVEL", "HISTORY", "Health", "Law",  "Photography" , "BUSINESS")

for $category in $sequence 
order by $category ascending
return <category>{$category}</category>

Output:

  <category>Biographies</category> 
  <category>BUSINESS</category> 
  <category>Health</category> 
  <category>HISTORY</category> 
  <category>Law</category> 
  <category>Literature</category> 
  <category>Photography</category> 
  <category>PROFESSIONAL</category> 
  <category>Technical</category> 
  <category>TRAVEL</category> 
    
    Expected output : Order in ascendingwith hight precedence to capital case. 
i.e "BUSINESS" should get listed before "Biographies" , similarly "HISTORY" 
should get listed before "Health"

      <category>BUSINESS</category> 
 <category>Biographies</category> 
   <category>HISTORY</category> 
  <category>Health</category> 
  <category>Law</category> 
  <category>Literature</category> 
  <category>PROFESSIONAL</category> 
   <category>Photography</category> 
  <category>TRAVEL</category> 
  <category>Technical</category> 


Please let me know is there any possiblilty to sort in this way.Thanks in 
Advance.
 
Regards,
Mano

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to