You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/08/01 18:39:14 UTC
DO NOT REPLY [Bug 11371] -
setAttributeNS allows you to set attributes bound to namespaces that are not defined.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11371>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11371
setAttributeNS allows you to set attributes bound to namespaces that are not defined.
------- Additional Comments From keshlam@us.ibm.com 2002-08-01 16:39 -------
Sounds like correct operation per the DOM Level 2 spec.
Namespaces in the DOM are handled by "early binding"; the declaration is not
normally consulted by the DOM per se, and declarations are not required for
correct operation of the DOM.
If you serialize a DOM back to XML syntax (which seems to be what you mean by
"if the document is persisted", it is the serializer's responsibility to deal
with this situation by creating declarations at reasonable places when it
discovers they are necessary. I believe the Xerces serializers do include that
logic; if not, it should be added to them. (I know Xalan's serialization layer
does generate namespace declarations when needed.)
The DOM Level 3 Working Draft formalizes that by defining a namespace-usage
normalization process which is used by the Load/Save module and which can be
invoked by the user when desired. The precise algorithm has been evolving over
time; once it's fully cooked, we should probably make sure our results are
reasonably compatable with what they've defined.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org