/**
* @see JXPathBindingBuilderBase#buildBinding(Element, JXPathBindingManager.Assistant)
*/
public JXPathBindingBase buildBinding(Element bindingElm, Assistant assistant)
throws BindingException {
Library lib = assistant.getContext().getLocalLibrary();
String prefix = DomHelper.getAttribute(bindingElm, "prefix", null);
String uri = DomHelper.getAttribute(bindingElm, "uri", null);
if (prefix == null || uri == null) {
throw new BindingException("Import needs to specify both @uri and @prefix!",
DomHelper.getLocationObject(bindingElm));
}
try {
lib.includeAs(prefix, uri);
} catch (LibraryException e) {
throw new BindingException("Could not import library", e,
DomHelper.getLocationObject(bindingElm));
}