Last Comment Bug 338823 - Validate instance documents on xforms-rebuild
: Validate instance documents on xforms-rebuild
Status: RESOLVED FIXED
: fixed1.8.0.5, fixed1.8.1
Product: Core Graveyard
Classification: Graveyard
Component: XForms (show other bugs)
: Trunk
: All All
: P2 normal (vote)
: ---
Assigned To: Allan Beaufour
: Stephen Pride
:
Mentors:
http://www.w3.org/TR/xforms/
Depends on:
Blocks: 339217
  Show dependency treegraph
 
Reported: 2006-05-22 07:29 PDT by Allan Beaufour
Modified: 2016-07-15 14:46 PDT (History)
3 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Testcase (1.71 KB, application/xhtml+xml)
2006-05-30 07:32 PDT, Allan Beaufour
no flags Details
Patch (5.49 KB, patch)
2006-05-30 07:38 PDT, Allan Beaufour
doronr: review+
bugs: review+
Details | Diff | Splinter Review

Description Allan Beaufour 2006-05-22 07:29:19 PDT
Right now we only call ValidateDocument() on all instance documents on form load. Should we not be doing it for xforms-rebuild too?

If not, any new inserted nodes will not have the correct type set I guess.
Comment 1 Allan Beaufour 2006-05-25 10:00:14 PDT
(In reply to comment #0)
> Right now we only call ValidateDocument() on all instance documents on form
> load. Should we not be doing it for xforms-rebuild too?
> 
> If not, any new inserted nodes will not have the correct type set I guess.

I'm pretty confident that we should do this.
Comment 2 aaronr 2006-05-25 10:26:01 PDT
It sure sounds logical, but how are we going to represent the invalid document to the user?  If it is failing due to and instance node missing an attribute, for example, and no one links to that attribute, then what do we do?  And even if a control does link to this missing attr then the control won't be there anyhow.  I guess we just log the error?
Comment 3 Allan Beaufour 2006-05-25 23:52:00 PDT
(In reply to comment #2)
> It sure sounds logical, but how are we going to represent the invalid document
> to the user?  If it is failing due to and instance node missing an attribute,
> for example, and no one links to that attribute, then what do we do?  And even
> if a control does link to this missing attr then the control won't be there
> anyhow.  I guess we just log the error?

It's a bit tricky, I agree. Logging the error is also the best I can think of. Problem is that if we do not do it, schema types will not be correct.
Comment 4 Allan Beaufour 2006-05-30 06:44:56 PDT
This needs to be done for bug 339217 to make sense.
Comment 5 Allan Beaufour 2006-05-30 07:32:11 PDT
Created attachment 223783 [details]
Testcase
Comment 6 Allan Beaufour 2006-05-30 07:38:18 PDT
Created attachment 223784 [details] [diff] [review]
Patch
Comment 7 Allan Beaufour 2006-05-31 00:48:05 PDT
Fixed on trunk.

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