Last Comment Bug 394023 - Insert of attributes not reflected in bound form controls
: Insert of attributes not reflected in bound form controls
: fixed1.8.1.12
Product: Core Graveyard
Classification: Graveyard
Component: XForms (show other bugs)
: unspecified
: x86 Windows XP
: -- normal (vote)
: ---
Assigned To: Merle Sterling
Depends on:
Blocks: 410239
  Show dependency treegraph
Reported: 2007-08-28 10:12 PDT by John L. Clark
Modified: 2016-07-15 14:46 PDT (History)
4 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---

Test form demonstrating the bug (2.42 KB, application/xhtml+xml)
2007-08-28 10:17 PDT, John L. Clark
no flags Details
patch (2.90 KB, patch)
2007-08-28 18:17 PDT, Merle Sterling
aaronr: review+
bugs: review+
Details | Diff | Splinter Review

Description John L. Clark 2007-08-28 10:12:27 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20070725 Firefox/
Build Identifier: 2007-08-09-03-mozilla1.8

In some cases, when you add an attribute to an element, other expressions (such as for form controls) that reference the attribute are not updated.

Reproducible: Always
Comment 1 John L. Clark 2007-08-28 10:17:04 PDT
Created attachment 278601 [details]
Test form demonstrating the bug

When you activate the edit button next to an email address, the corresponding `person` element is marked for editing with an `s:selected` attribute; the edit group should refer to the "selected" `person` element, but it does not rebind to the newly selected `person` element.  (Note that I am using XForms Buddy to verify that the attributes are actually being placed on the correct `person` element.)  Also, note that the `xf:output` that counts the number of `s:selected` attributes is also not updated, and finally that the "Unselect all" button does not delete the `s:selected` attributes that are added using the edit button.
Comment 2 Merle Sterling 2007-08-28 18:12:45 PDT
The namespace of an attribute was not considered when inserting an attribute so the actual name of the attribute that was inserted was 's:selected'. XPath however, recognizes s:selected as a namespace prefix + local name and did not match a node with an attribute whose local name was s:selected.

Comment 3 Merle Sterling 2007-08-28 18:17:09 PDT
Created attachment 278689 [details] [diff] [review]

Take into account namespaces when checking for duplicate attributes and inserting a new attribute.
Comment 4 Olli Pettay [:smaug] 2007-09-06 02:44:57 PDT
Comment on attachment 278689 [details] [diff] [review]

Not sure if XForms patches need approval while in
M8 freeze. XForms is not part of the build.
Comment 5 Olli Pettay [:smaug] 2007-09-06 11:17:04 PDT
Comment on attachment 278689 [details] [diff] [review]

According to, this doesn't need approval
Comment 6 Olli Pettay [:smaug] 2007-09-06 11:31:04 PDT
Checked in
Comment 7 aaronr 2008-01-08 19:22:40 PST
checked into 1.8 branch via bug 410239.

Note You need to log in before you can comment on or make changes to this bug.