Document document = documentBuilder.newDocument();
Element address = document.createElementNS(getNamespaceUri(), QNameUtils.toQualifiedName(getAddressName()));
address.setTextContent(epr.getAddress().toString());
transform(new DOMSource(address), headerElement.getResult());
if (getReferenceParametersName() != null && !epr.getReferenceParameters().isEmpty()) {
Element referenceParams = document.createElementNS(getNamespaceUri(),
QNameUtils.toQualifiedName(getReferenceParametersName()));
addReferenceNodes(new DOMResult(referenceParams), epr.getReferenceParameters());
transform(new DOMSource(referenceParams), headerElement.getResult());
}
if (getReferencePropertiesName() != null && !epr.getReferenceProperties().isEmpty()) {