if (item instanceof NodeInfo) {
NodeInfo node = (NodeInfo)item;
if (first == null) {
first = node;
} else {
if (comparer.compare(node, first) < 0) {
first = node;
}
}
} else {
XPathException e = new XPathException("Operand of trailing() contains an item that is not a node");