try {
Item item = ((Value) value).asItem();
if (item == null) {
exp.bindSequence(variable, xqconn.createSequence(Collections.EMPTY_LIST.iterator()));
} else {
XQItem item2 = new SaxonXQItem(item, saxonConn);
exp.bindItem(variable, item2);
}
} catch (XPathException e) {
__log.warn("", e);
}