Using a schema to sort an XML document
Say I have an XML document (represented as text, a W3C DOM, whatever), and also an XML Schema. The XML document has all the right elements as defined by the schema, but in the wrong order. How do I use the schema to "re-order" the elements in the document to conform to the ordering defined by the schema? I know that this should be poss...