int props = path.getSpecialProperties();
if ((props & StaticProperty.ORDERED_NODESET) != 0) {
return path;
} else if ((props & StaticProperty.REVERSE_DOCUMENT_ORDER) != 0) {
return new Reverser(path);
} else {
return new DocumentSorter(path);
}
} else {
return offer.containingExpression;