/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { Envelope envelope = (Envelope) xmlObject; QName attribQName = QNameSupport.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute .getPrefix()); if (attribute.isId()) { envelope.getUnknownAttributes().registerID(attribQName); } envelope.getUnknownAttributes().put(attribQName, attribute.getValue()); }
/** {@inheritDoc} */ protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException { Envelope envelope = (Envelope) xmlObject; Attr attribute; for (Entry<QName, String> entry : envelope.getUnknownAttributes().entrySet()) { attribute = AttributeSupport.constructAttribute(domElement.getOwnerDocument(), entry.getKey()); attribute.setValue(entry.getValue()); domElement.setAttributeNodeNS(attribute); if (XMLObjectProviderRegistrySupport.isIDAttribute(entry.getKey()) || envelope.getUnknownAttributes().isIDAttribute(entry.getKey())) { attribute.getOwnerElement().setIdAttributeNode(attribute, true); } } }