3.1.4.1.1.3 ad:Sorting

The optional element /soapenv:Envelope/soapenv:Body/wsen:Enumerate/ad:Sorting determines which attribute the sorting of resultant items in the response message for that specific enumeration would depend on. The Sorting element is optional and, if specified, MUST contain exactly one SortingProperty (see section 3.1.4.1.1.3.1). An optional Ascending attribute (see section 3.1.4.1.2.2) is used to specify ascending or descending sort order. If the Sorting element is not specified, the results are not sorted.

Following is the XML Schema [XMLSCHEMA1] definition of the Sorting element:

 <xsd:element name ="Sorting">
   <xsd:complexType>
     <xsd:sequence>
       <xsd:element name="SortingProperty"  minOccurs="1"
             maxOccurs ="1">
       <xsd:complexType>
         <xsd:simpleContent>
           <xsd:extension base="xsd:string">
             <xsd:attribute name="Ascending" use="optional" default="true" type="xsd:boolean"/>
           </xsd:extension>
         </xsd:simpleContent>
       </xsd:complexType>
     </xsd:element>
   </xsd:sequence>
   <xsd:attribute name="Dialect" fixed=http://schemas.microsoft.com/2008/1/ActiveDirectory/Dialect/XPath-Level-1 use="required"/>
   </xsd:complexType>
 </xsd:element>

For example, the following XML shows the contents of the Sorting element:

  
 <ad:Sorting Dialect="http://schemas.microsoft.com/2008/1/ActiveDirectory/Dialect/XPath-Level-1">
   <ad:SortingProperty    Ascending=(true|false)>
     <XPath Level>
   </ad:SortingProperty>
 </ad:Sorting>

The value of /s:Envelope/s:Body/wsen:Enumerate/ad:Sorting/@Dialect is specified in section 3.1.4.1.2.2.