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 Claude Montpetit <cm...@nertec.com> on 2002/09/17 14:05:32 UTC
cloneNode bug in CoreDocumentImpl.java ?
Version: xerces-J 2.1.0
When I clone a document that has elements with default attributes from a
schema, the default attributes are not copied. But the
org.w3c.dom.Document.cloneNode method specification mentions this:
"Note: When Elements are cloned, all attribute nodes are
cloned, including those generated by the XML processor
to represent defaulted attributes".
Is this a bug in the implementation?
The implementation of cloneNode eventually leads to this code:
...
// Copy the attribute only if it is not a default.
if (attr.getSpecified()) {
... // cloning of attributes here
This is in org.apache.xerces.dom.CoreDocumentImpl.java, at line 1531. This
seems to be the opposite to what the spec says.
Am I misinterpreting the spec?
Claude Montpetit
cmontpetit@nertec.com
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org