Lines 861-866
Link Here
|
861 |
|
861 |
|
862 |
Node parent = prop.getParentNode(); |
862 |
Node parent = prop.getParentNode(); |
863 |
this.node = f.createElement(prop); |
863 |
this.node = f.createElement(prop); |
|
|
864 |
configureNS(node, parent); |
864 |
|
865 |
|
865 |
if (DDLogFlags.debug) { |
866 |
if (DDLogFlags.debug) { |
866 |
TraceLogger.put(TraceLogger.DEBUG, TraceLogger.SVC_DD, |
867 |
TraceLogger.put(TraceLogger.DEBUG, TraceLogger.SVC_DD, |
Lines 902-907
Link Here
|
902 |
NodeFactory f = prop.getNodeFactory(); |
903 |
NodeFactory f = prop.getNodeFactory(); |
903 |
if (node == null) { |
904 |
if (node == null) { |
904 |
node = f.createElement(prop); |
905 |
node = f.createElement(prop); |
|
|
906 |
configureNS(node, parent); |
905 |
Node sibling = prop.getFollowingSibling(this); |
907 |
Node sibling = prop.getFollowingSibling(this); |
906 |
parent.insertBefore(this.node, sibling); |
908 |
parent.insertBefore(this.node, sibling); |
907 |
} |
909 |
} |
Lines 943-949
Link Here
|
943 |
if (this.node == null) { |
945 |
if (this.node == null) { |
944 |
Node parent = prop.getParentNode(); |
946 |
Node parent = prop.getParentNode(); |
945 |
this.node = f.createElement(prop); |
947 |
this.node = f.createElement(prop); |
946 |
|
948 |
configureNS(node, parent); |
|
|
949 |
|
947 |
if (DDLogFlags.debug) { |
950 |
if (DDLogFlags.debug) { |
948 |
TraceLogger.put(TraceLogger.DEBUG, |
951 |
TraceLogger.put(TraceLogger.DEBUG, |
949 |
TraceLogger.SVC_DD, |
952 |
TraceLogger.SVC_DD, |
Lines 1002-1007
Link Here
|
1002 |
boolean hasDomNode() { |
1005 |
boolean hasDomNode() { |
1003 |
return (this.node != null); |
1006 |
return (this.node != null); |
1004 |
} |
1007 |
} |
|
|
1008 |
|
1009 |
private static void configureNS(Node node, Node parent) { |
1010 |
Document doc = parent.getOwnerDocument(); |
1011 |
if (parent.getNamespaceURI() != null && parent.getNamespaceURI().equals(node.getNamespaceURI())) { |
1012 |
node.setPrefix(parent.getPrefix()); |
1013 |
} else if (parent.getNamespaceURI() != null |
1014 |
&& node instanceof Element |
1015 |
&& doc.getDocumentElement().getNamespaceURI() != null) { |
1016 |
((Element) node).setAttribute("xmlns", doc.getDocumentElement().getNamespaceURI()); // NOI18N |
1017 |
} |
1018 |
} |
1005 |
} |
1019 |
} |
1006 |
|
1020 |
|
1007 |
|
1021 |
|