if (!ls.isEmpty() && !rs.isEmpty()) {
if (!Type.subTypeOf(ls.itemAt(0).getType(), Type.NODE))
{throw new XPathException(this, ErrorCodes.XPTY0004,
"left item is not a node; got '" +
Type.getTypeName(ls.itemAt(0).getType()) + "'");}
if (!Type.subTypeOf(rs.itemAt(0).getType(), Type.NODE))
{throw new XPathException(this, ErrorCodes.XPTY0004,
"right item is not a node; got '" +
Type.getTypeName(rs.itemAt(0).getType()) + "'");}
final NodeValue lv = (NodeValue)ls.itemAt(0);
final NodeValue rv = (NodeValue)rs.itemAt(0);