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 "Michael Glavassevich (JIRA)" <xe...@xml.apache.org> on 2006/06/19 00:45:30 UTC

[jira] Resolved: (XERCESJ-1123) Schema default attributes overwritten when names collide.

     [ http://issues.apache.org/jira/browse/XERCESJ-1123?page=all ]
     
Michael Glavassevich resolved XERCESJ-1123:
-------------------------------------------

    Resolution: Fixed

We need to take special care of schema defaulted attributes. Calling the non-namespace aware setAttributeNode() method could overwrite another attribute with the same local name. Since we know all of the attributes in the document which were not defaulted from the schema will have unique qualified names and that all of the schema defaults will be at the end of the list we can add them to the element with setAttributeNode(). Schema defaults are added with setAttributeNodeNS(). Normally its unwise to mix these methods but the implementation of setAttributeNode() in Xerces is much more efficient [O(log n) instead of O(n)] than setAttributeNodeNS(), it would hurt performance if we switched over in all cases. Should be fixed in SVN now.

> Schema default attributes overwritten when names collide.
> ---------------------------------------------------------
>
>          Key: XERCESJ-1123
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1123
>      Project: Xerces2-J
>         Type: Bug

>   Components: DOM (Level 3 Core)
>     Versions: 2.7.1
>  Environment: Linux.
>     Reporter: Chris Simmons
>     Assignee: Michael Glavassevich
>     Priority: Minor
>  Attachments: bug.zip
>
> If you have an element with a schema-defaulted attribute, and another attribute with the same local name actually occurring on that element, then one of the attributes is lost.  This occurs when parsing (ie not an issue with the DOM tree as such).
> I think the problem is that AbstractDOMParser does

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org