Closed
Bug 339217
Opened 18 years ago
Closed 8 years ago
insert should generate new id for xsd:ID nodes
Categories
(Core Graveyard :: XForms, defect, P3)
Core Graveyard
XForms
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: allan, Unassigned)
References
()
Details
Attachments
(3 files, 1 obsolete file)
2.23 KB,
application/xhtml+xml
|
Details | |
2.06 KB,
application/xhtml+xml
|
Details | |
16.58 KB,
patch
|
Details | Diff | Splinter Review |
Insert should generate unique IDs when inserting new data: "In this process, nodes of type xsd:ID are modified to remain as unique values in the instance data." [http://www.w3.org/TR/2006/REC-xforms-20060314/slice9.html#action-insert]
Reporter | ||
Comment 1•18 years ago
|
||
Reporter | ||
Updated•18 years ago
|
Priority: -- → P3
Reporter | ||
Comment 2•18 years ago
|
||
There is something slightly wicked about this: If the types are set via a schema, then rebuild needs to have run for the types to be set (bug 338823). That's mighty fine, if it were not for deferred actions. Then we have to defer the updating of newly inserted nodes until rebuild actually runs (and before recalculate, or new values will not be used). Ouch. I might do a follow up bug for that one.
Status: NEW → ASSIGNED
Reporter | ||
Updated•18 years ago
|
Assignee: xforms → allan
Status: ASSIGNED → NEW
Reporter | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
Reporter | ||
Comment 3•18 years ago
|
||
Reporter | ||
Comment 4•18 years ago
|
||
I'm not sure it's ready. It could be, but gotta go now.
Reporter | ||
Comment 5•18 years ago
|
||
There's a couple of unknowns about how this should be done (at least for me): http://lists.w3.org/Archives/Public/www-forms/2006May/0174.html I might do a some-of-the-way patch for 0.6 though.
Reporter | ||
Comment 6•18 years ago
|
||
It would be a good feature to have in 0.6, so here's a patch that "assumes" a few things for the questions in comment 5: 1) the id modification happens between rebuild and recalculate 2) the id is not necessarily unique, but for 99.9% of the cases it is. I use "moz-xf-id" as a prefix to not clash with XSL-generated IDs. 3) modification does not adhere to the readonly MIP (just as calculate does not either) 4) deferred actions are not handled Codewise I have two issues: 1) I'm a bit unsigned about the pointer conversion. It should be alright, but I'm not 100% sure. 2) I'm pondering massaging the node directly through nsINode instead, to avoid all the DOM calls, but then again, it's better to rely on the DOM calls. If you are ok with the assumptions, I'll post a follow up bug for fixing them / assuring that they are correct.
Attachment #223794 -
Attachment is obsolete: true
Attachment #223909 -
Flags: review?(Olli.Pettay)
Reporter | ||
Comment 7•18 years ago
|
||
Comment on attachment 223909 [details] [diff] [review] Patch clearing review request... the modification might happen during the cloning, not after....
Attachment #223909 -
Flags: review?(Olli.Pettay)
Reporter | ||
Updated•17 years ago
|
Assignee: allan → xforms
Status: ASSIGNED → NEW
Comment 8•8 years ago
|
||
RIP xforms
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•