}
public <T extends ExtensibleElement> T addExtension(Element extension) {
complete();
if (extension instanceof ElementWrapper) {
ElementWrapper wrapper = (ElementWrapper)extension;
extension = wrapper.getInternal();
}
QName qname = extension.getQName();
String prefix = qname.getPrefix();
declareIfNecessary(qname.getNamespaceURI(), prefix);
addChild((OMElement)extension);