I am using InfoPath 2007, and I have several XML schema documents, one of which defines a complexType with the abstract attribute set to true, e.g.:
<xs:complexType name="someType" abstract="true">
<xs:attribute name="id" type="xs:int" use="required"/>
<xs:attribute name="version" type="xs:positiveInteger" use="required"/>
</xs:complexType>
The remaining schema documents contain derived types based on this abstract type, e.g.:
<xs:complexType name="aDerivedType" abstract="true">
<xs:complexContent>
<xs:restriction base="ns:someType">
<xs:attribute name="id" type="xs:int" fixed="1" use="required"/>
<xs:attribute name="version" type="xs:positiveInteger" fixed="1" use="required"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="anotherDerivedType">
<xs:complexContent>
<xs:extension base="aDerivedType">
<xs:element name="name" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
I also have a master schema document that possesses an element of the original abstract complex type (someType).
When I design a form template based on the master schema document, InfoPath alerts me that the schema information is incomplete and that the abstract complex type (someType) needs to be specialized. I then add the schema documents that contain the specializations to the data source. My problem is that when I then create a section with controls and save the form template, InfoPath cannot open the resulting form, giving me the error that the abstract element is not allowed in an instance document.
Is there some basic error that I’m making when I design the form template? Maybe the schema documents aren’t quite right? I’ve found that even if I don’t drag anything from my data source into the design area and save the (empty) form template that InfoPath gives the same error when I try to open the empty form.
The MSDN website (http://msdn.microsoft.com/en-us/library/bb251017(v=office.12).aspx) indicates that abstract complex types are supported in InfoPath 2007, even giving an example (specialization of an address type). Is this in fact the case?
(Please note that my example XSD is somewhat contrived, but hopefully it serves to explain my problem.)