String xqueryLocation = reader.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 (reader.hasNext()) {
if (reader.next() == END_ELEMENT && IMPLEMENTATION_XQUERY_QNAME.equals(reader.getName())) {
break;
}
} // end while
xqueryImplementation.setUnresolved(true);
return xqueryImplementation;
}