public void buildLibrary(Element libraryElement) throws Exception {
sourceURI = LocationAttributes.getURI(libraryElement);
Element widgetsElement = DomHelper.getChildElement(libraryElement, FormsConstants.DEFINITION_NS, "widgets", true);
WidgetDefinitionBuilderContext context = new WidgetDefinitionBuilderContext(this);
// All child elements of the widgets element are widgets
Element[] widgetElements = DomHelper.getChildElements(widgetsElement, FormsConstants.DEFINITION_NS);
for (int i = 0; i < widgetElements.length; i++) {
Element widgetElement = widgetElements[i];