Closed Bug 338823 Opened 18 years ago Closed 18 years ago

Validate instance documents on xforms-rebuild

Categories

(Core Graveyard :: XForms, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: allan, Assigned: allan)

References

()

Details

(Keywords: fixed1.8.0.5, fixed1.8.1)

Attachments

(2 files)

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.
(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.
Priority: -- → P2
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?
(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.
This needs to be done for bug 339217 to make sense.
Assignee: doronr → allan
Blocks: 339217
Attached file Testcase
Status: NEW → ASSIGNED
Attached patch PatchSplinter Review
Attachment #223784 - Flags: review?(doronr)
Attachment #223784 - Flags: review?(doronr) → review+
Attachment #223784 - Flags: review?(Olli.Pettay)
Attachment #223784 - Flags: review?(Olli.Pettay) → review+
Fixed on trunk.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Summary: Validate instance documents on xforms-rebuild? → Validate instance documents on xforms-rebuild
Whiteboard: xf-to-branch
Keywords: fixed1.8.0.5
Keywords: fixed1.8.1
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: