diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlComposer.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlComposer.java index 0b661a872..1ff09d550 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlComposer.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xhtml/XhtmlComposer.java @@ -314,6 +314,9 @@ public class XhtmlComposer { else if (node.getNodeType() == NodeType.Element) { Element child = e.getOwnerDocument().createElementNS(XHTML_NS, node.getName()); e.appendChild(child); + for (String n : node.getAttributes().keySet()) { + child.setAttribute(n, node.getAttribute(n)); + } for (XhtmlNode c : node.getChildNodes()) { appendChild(child, c); }