cardOK = Cardinality.subsumes(reqCard, suppliedCard);
}
if (!itemTypeOK) {
// rule 2
if (reqItemType.equals(BuiltInAtomicType.STRING)) {
StringFn fn = (StringFn) SystemFunction.makeSystemFunction("string", new Expression[]{exp});
try {
exp = visitor.typeCheck(visitor.simplify(fn), AnyItemType.getInstance());
} catch (XPathException err) {
err.maybeSetLocation(exp.getSourceLocator());
throw err.makeStatic();