Hello all,
I'm having problems designing a form template that uses a template part which, in turn, uses a template part.
Here are the 3 schemas (main form, which is made up of 'modules', which are made up of 'pages'):
Main:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:include schemaLocation="module.xsd"/>
<xsd:element name="modules">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="module" minOccurs="1" maxOccurs="4"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Module:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:include schemaLocation="page.xsd"/>
<xsd:element name="module">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="page" minOccurs="1" maxOccurs="4"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Page:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="page">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="videoElement">
<xsd:complexType>
<xsd:attribute name="title" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="audioElement">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
I have successfully created a template part for the Page element, based on the Page schema, and a template part for the Module element, based on the Module schema. The template part for the Module element uses the 'Page' template part, of course.
Now that I'm designing the main form, based on the Main schema, I'm getting an error message when I try to bind the 'Module' template part (now a Custom Control) to the "module" element of the 'main' schema (the error being "Module cannot be bound to the selected field or group").
Does anyone have any hint? What am I doing wrong?
Many thanks in advance!