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
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]