throws XQueryException {
final int ttid = trgType.getTypeId();
if(ttid == TypeTable.NOTATION_TID || ttid == TypeTable.ANY_ATOM_TID) {
throw new StaticError("err:XPST0080", "Illegal target type: " + trgType);
}
final AtomicType type = _type;
if(type == trgType) {
return (T) this;
}
final boolean mayCastable = TypeTable.isMayCastable(type, trgType);
if(mayCastable) {