public void analyze(AnalyzeContextInfo contextInfo) throws XPathException {
contextInfo.setParent(this);
expression.analyze(contextInfo);
expression = new DynamicCardinalityCheck(context, type.getCardinality(), expression,
new Error("XPDY0050", type.toString()));
expression = new DynamicTypeCheck(context, type.getPrimaryType(), expression);
}