// Setting properties
for (Map.Entry<String, Object> entry : properties.entrySet()) {
dynamicContext.setParameter(entry.getKey(), transformProperty(entry.getValue(), config));
}
SequenceIterator iterator = null;
Configuration oldConfigValue = SaxonDataBindingHelper.CURR_EXECUTING_CONFIG;
SaxonDataBindingHelper.CURR_EXECUTING_CONFIG = config;
try {
iterator = exp.iterator(dynamicContext);
} finally {
SaxonDataBindingHelper.CURR_EXECUTING_CONFIG = oldConfigValue;
}
Item item = iterator.next();
if (item == null) {
return null;
}
if (item instanceof NodeInfo) {
return item;