if (localName.equals(WIDGET) || localName.equals(REPEATER_WIDGET)) {
checkContextWidgetAvailable(qName);
inWidgetElement = true;
widgetElementNesting = elementNestingCounter;
gotStylingElement = false;
saxBuffer = new SaxBuffer();
// retrieve widget here, but its XML will only be streamed in the endElement call
widget = getWidget(attributes);
repeaterWidget = localName.equals(REPEATER_WIDGET);
if (repeaterWidget && !(widget instanceof Repeater)) {
throw new SAXException("WoodyTemplateTransformer: the element \"repeater-widget\" can only be used for repeater widgets.");