Expression key = sortKey.expression;
if (key.getItemType(config.getTypeHierarchy()) instanceof NodeTest) {
sortKey.expression = new Atomizer(key, config);
}
SortKeyDefinition sk = new SortKeyDefinition();
sk.setSortKey(sortKey.expression);
AtomicComparer comp = sk.makeComparator(context);
AtomicComparer[] comps = {comp};
iterator = new SortedIterator(context, iterator, this, comps);
((SortedIterator)iterator).setHostLanguage(Configuration.XPATH);
}