// Inherit Javadoc.
public void addElementOverhead(DissectableElement element,
Accumulator accumulator)
throws DissectionException {
WBDOMElement delement = (WBDOMElement) element;
try {
WBSAXNameSizer nameSummer = new WBSAXNameSizer(accumulator);
WBSAXAttributeValueSizer attributeValueSummer =
new WBSAXAttributeValueSizer(accumulator);
AttributesInternalIterator attributesSummer =
new VisitorAttributesIterator(nameSummer,
attributeValueSummer);
// Calculate the size of the element name.
delement.accept(nameSummer);
// Calculate the size of the attributes
if (delement.hasAttributes()) {
delement.forEachAttribute(attributesSummer);
}
// Add one for the content end marker if will be one.
if (delement.hasChildren() || delement.getEmptyType() ==
EmptyElementType.StartAndEndTag) {
accumulator.add(1);
}
} catch (WBDOMException e) {
throw new DissectionException(