}
for (String prefix : nsBindings.keySet()) {
xcomp.declareNamespace(prefix, nsBindings.get(prefix));
}
XPathExecutable xexec = null;
try {
xexec = xcomp.compile(xpath);
} catch (SaxonApiException sae) {
Throwable t = sae.getCause();
if (t instanceof XPathException) {
XPathException xe = (XPathException) t;
if (xe.getMessage().contains("Undeclared (or unbound?) variable")) {
throw XProcException.dynamicError(26, step.getNode(), xe.getMessage());
}
}
throw sae;
}
XPathSelector selector = xexec.load();
for (QName varname : boundOpts.keySet()) {
XdmValue value = null;
RuntimeValue rval = boundOpts.get(varname);
if (runtime.getAllowGeneralExpressions() && rval.hasGeneralValue()) {