A few customers have run into an unspecified error when attempting to add service pack features to an RTM form template when using the InfoPath SP1 Preview Release design mode. For anyone who has created a form template outside of InfoPath or added/changed the schemas for a form template by hand this might be an interesting read.
There is a section in the XSF called the documentSchemas section that is used to define all the namespaces and their corresponding XSD schema for the form template. Here is the documentSchemas element InfoPath creates for a form template that uses two namespaces “http://root” and “http://imported”, each with its own schema:
<xsf:documentSchemas> <xsf:documentSchema rootSchema="yes" location="http://root root.xsd"></xsf:documentSchema> <xsf:documentSchema location="http://imported imported.xsd"></xsf:documentSchema></xsf:documentSchemas>
Note that in this case, the root element of the form template comes from root.xsd and its documentSchema entry has an attribute “rootSchema” with a value of “yes”. The documentSchemas section should contain an entry for every namespace that is used in the main data source for the form template; herein lays the problem. The InfoPath team has seen a number of form templates where schemas were added outside of InfoPath but the documentSchemas section was not updated accordingly. Depending on whether you are the glass half empty or half full type of person, the RTM version of InfoPath didn’t mind this but the SP1 Preview Release does.
That should suffice to explain the issue; where does that leave you?
With all that said there is some pretty good news – with the SP1 Preview Release you can now provide an updated schema to InfoPath and we will update the form template accordingly. This will be the topic of another blog entry soon!