Hook up schema validation to xforms submission
I'm not 100% sure that this is a "[good first bug]". The submission handling needs to be restructured. Right now there are different code paths for turning instance data into a submit. We need to unify that to:
1) everything is serialized into an XML document
2) all non-relevant nodes are pruned
3) the XML document is fed to schema validation
4) the specific serialization method is run
Created attachment 222347 [details]
Have the testcase right Doron?
(In reply to comment #2)
> Created an attachment (id=222347) 
> Have the testcase right Doron?
Free "I got"'s handed out at the exit.
I'll look at it
Should be fairly easy to fix bug 338314, while doing this as this should streamline the serialization process in general anyways.
As a result of bug 338314, it should be fairly easy to add this now. nsXFormsSubmissionElement::Submit() just needs to validate the document.
The problem is that I am not sure what to do, because I just ran through the spec., and there is not mention of what I thought we were supposed to do here.
"2. All selected instance data nodes are checked for validity according to the definition in 4.3.5 The xforms-revalidate Event (no notification events are marked for dispatching due to this operation). Any selected instance data node that is required but empty or found to be invalid stops submission processing after dispatching event xforms-submit-error."
Eh? I was expecting to see something about "perform full schema validation", because that is what I have always thought was supposed to happen.
Since it is not clear what this actually means, it will miss 0.6
Yeah, I think we need to get this all clarified. Because we also need to know what to do if the value of a node is perfectly valid but what if the document that contains it is invalid (the instance node isn't in the right place in the document relative to another node, for example, or is missing an attribute). The spec doesn't seem to differentiate between validating the value of an instance node and validaing the node itself.