summaryrefslogtreecommitdiff
path: root/gnu/xml/dom/DomNode.java
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/xml/dom/DomNode.java')
-rw-r--r--gnu/xml/dom/DomNode.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/gnu/xml/dom/DomNode.java b/gnu/xml/dom/DomNode.java
index c06a4c1f1..f0915eb5e 100644
--- a/gnu/xml/dom/DomNode.java
+++ b/gnu/xml/dom/DomNode.java
@@ -1113,12 +1113,15 @@ public abstract class DomNode
{
DomDocument doc = (nodeType == DOCUMENT_NODE) ?
(DomDocument) node : node.owner;
+ boolean building = doc.building;
+ doc.building = true; // Permit certain structural rules
for (DomNode ctx = first; ctx != null; ctx = ctx.next)
{
DomNode newChild = (DomNode) ctx.cloneNode(deep);
newChild.setOwner(doc);
node.appendChild(newChild);
}
+ doc.building = building;
}
if (nodeType == ENTITY_REFERENCE_NODE)
{