Hi
Running Infopath SP1/Windows XP.
I am no longer able to open my form in Design view as I get the error "Infopath has encountered an error. The operation failed".
Now, when I rip out part of the XSL on one of my views it works again, but as soon as I drag part of my data source tree onto the form to create the controls, the error reoccurs (after I save and reload). Now, I understand that the XSL generated is going to be dependent on the schema (myschema.xsd) so I have been fiddling with the schema with some success. I can get it working, but then it no longer does what I want. This is the part of the schema it is having trouble generating working XSL from (note the recursion):
<xsd:element name="sections">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="my:section" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="section">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="my:list" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute ref="heading"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="list">
<xsd:complexType>
<xsd:sequence>
<xsd:choice>
<xsd:element ref="my:condition" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="my:list-item" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute ref="type"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="condition">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="my:list-item-part" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute ref="specialexpiry"/>
<xsd:attribute ref="indextext"/>
<xsd:attribute ref="number"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="list-item-part">
<xsd:complexType>
<xsd:choice>
<xsd:element ref="my:content" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="my:list" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:element name="content" type="xsd:string"/>
<xsd:element name="list-item">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="my:list-item-part" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute ref="indextext"/>
<xsd:attribute ref="number"/>
</xsd:complexType>
</xsd:element>
Any ideas? In plain English, I have a sections group which contains sections, each section can contain lists, each list can contain either a sequence of list items or a sequence of conditions. Each list item or condition can contain some some text content, or another list.
Any ideas why this would fail?
Regards
Adam