QName q = (QName)value;
return new QNameValue(q.getPrefix(), q.getNamespaceURI(), q.getLocalPart(),
BuiltInAtomicType.QNAME, null);
} else if (value instanceof Node) {
JPConverter jp = DOMObjectModel.getInstance().getJPConverter(Node.class);
return Value.asItem(jp.convert(value, new EarlyEvaluationContext(config, null)));
//return Value.asItem(DOMObjectModel.getInstance().convertObjectToXPathValue(value, config));
} else if (value instanceof Source) {
// Saxon extension to the XQJ specification
Builder b = new TinyBuilder();
PipelineConfiguration pipe = config.makePipelineConfiguration();