public void postValidate() throws XPathException {
// check that a parameter is supplied for each required parameter
// of the containing saxon:iterate instruction
if (saxonIterate != null) {
AxisIterator declaredParams = saxonIterate.iterateAxis(Axis.CHILD);
while(true) {
NodeInfo param = (NodeInfo)declaredParams.next();
if (param == null) {
break;
}
if (param instanceof XSLParam && ((XSLParam)param).isRequiredParam()) {
AxisIterator actualParams = iterateAxis(Axis.CHILD);
boolean ok = false;
while(true) {
NodeInfo withParam = (NodeInfo)actualParams.next();
if (withParam == null) {
break;
}
if (withParam instanceof XSLWithParam &&
((XSLWithParam)withParam).getVariableQName().equals(
((XSLParam)param).getVariableQName())) {
ok = true;
break;
}
}
if (!ok) {
compileError("No value supplied for required parameter " +
Err.wrap(((XSLParam)param).getVariableDisplayName(), Err.VARIABLE), "XTSE0690");
}
}
}
// check that every supplied parameter is declared in the saxon:iterate instruction
AxisIterator actualParams = iterateAxis(Axis.CHILD);
while(true) {
NodeInfo w = (NodeInfo)actualParams.next();
if (w == null) {
break;
}
if (w instanceof XSLWithParam && !((XSLWithParam)w).isTunnelParam()) {
XSLWithParam withParam = (XSLWithParam)w;
AxisIterator formalParams = saxonIterate.iterateAxis(Axis.CHILD);
boolean ok = false;
while(true) {
NodeInfo param = (NodeInfo)formalParams.next();
if (param == null) {
break;
}
if (param instanceof XSLParam &&
((XSLParam)param).getVariableQName().equals(withParam.getVariableQName())) {