switch (itemType.getTag()) {
case ITEM_TYPE:
return AnyItemType.INSTANCE;
case ATOMIC_TYPE: {
AtomicTypeNode atNode = (AtomicTypeNode) itemType;
QName tName = createQName(atNode.getName());
SchemaType sType = moduleCtx.lookupSchemaType(tName);
if (sType == null || !sType.isAtomicType()) {
throw new SystemException(ErrorCode.XPST0051, atNode.getSourceLocation());
}
return (ItemType) sType;
}
case ANY_NODE_TEST: