if ((props & StaticProperty.ORDERED_NODESET) != 0) {
return this;
} else if ((props & StaticProperty.REVERSE_DOCUMENT_ORDER) != 0) {
return SystemFunction.makeSystemFunction("reverse", new Expression[]{this});
} else {
return new DocumentSorter(this);
}
} else if (stepType.isAtomicType()) {
// This is a simple mapping expression: a/b where b returns atomic values
AtomicMappingExpression ame = new AtomicMappingExpression(start, step);