Mark Wilson I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :
03/24/2008
Times viewed :
240
XQuery Sorting Expressions
This type of expressions is used when the order of a sequence has to be
changed. It is basically done using the SORTBY clause.
This xquery first assigns the variable $a all the available titles,
returns them, and sorts them in by title, in ascending order, which is the
default.
The output generated cannot be verified using MS XQuery Demo, because
the SORTBY clause is still not supported; you can check that by running
the xquery: the output is the following text:
'SORTBY' is not implemented.
It runs however when you delete the bolded phrase "SORTBY
(title)", and its output is shown here: