String xqueryLocation = inputSource.getAttributeValue(null, LOCATION);
if (xqueryLocation == null) {
throw new ContributionReadException( MSG_LOCATION_MISSING );
}
/* Create the XQuery implementation and set the location into it */
XQueryImplementation xqueryImplementation = XQueryImplementationFactory.INSTANCE.createXQueryImplementation();
xqueryImplementation.setLocation( xqueryLocation );
// Skip to end element
while (inputSource.hasNext()) {
if (inputSource.next() == END_ELEMENT && IMPLEMENTATION_XQUERY_QNAME.equals(inputSource.getName())) {
break;
}
} // end while
xqueryImplementation.setUnresolved(true);
return xqueryImplementation;
} catch (XMLStreamException e) {
throw new ContributionReadException(e);