<xsl:sort> element is used to define a sort key
which specifies the order in which nodes selected by either
are processed. The nodes can be sorted either in numerical or alphabetic
order, and the alphabetic order may vary depeinding on the language in use.
The nodes can be sorted either in ascending or descending order.
Static methods of the Sort class is responsible for generating the
necessary code for invoking SortingIterators under
elements. Both these elements can have several
child nodes defining primary, secondary, teriary, etc. keys. The code for
create vectors containg a Sort object for each sort key. The object methods
of the Sort object encapsulate a container for key-specific data (such as the
sort key itself, sort order, sort type, and such) while the static methods
take a vector of Sort objects and generate the actual code.
translate() method of the Sort object is never called. The
vectors containing the Sort objects for a
<xsl:for-each> element are instead passed to the static
translateSortIterator() method. This method compiles code that
instanciates a SortingIterator object that will pass on a node-set in a
specific order to the code handling the