RoleLocator role = new RoleLocator(RoleLocator.VARIABLE, getVariableQName(), 0);
//role.setSourceLocator(this);
sequence = TypeChecker.strictTypeCheck(
sequence, requiredType, role, visitor.getStaticContext());
final TypeHierarchy th = visitor.getConfiguration().getTypeHierarchy();
final ItemType actualItemType = sequence.getItemType(th);
refineTypeInformation(actualItemType,
sequence.getCardinality(),
(sequence instanceof Literal ? ((Literal) sequence).getValue() : null),