The problem is with the schema itself. The paragraph element contains strong, emphasis and underline elements inline e.g.
<xsd:element name="emphasis" type="xsd:string" />
<xsd:element name="strong" type="xsd:string" />
<xsd:element name="underline" type="xsd:string" />
(same with the super/subscript).
What you need to do is create a type for the above as follows...
<xsd:element name="strong" type="StrongType"/>
...etc
and then define the type...
<xsd:complexType name="StrongType" mixed="true">
<xsd:choice maxOccurs="unbounded">
<xsd:element ref="emphasis" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
</xsd:complexType>
Note that the emphasis is included (as well may the underline) to allow strong/emphasis combinations.
Now you need to include the elements defined using the ref attribute instead...
<xsd:element ref="strong" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="emphasis" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="underline" minOccurs="0" maxOccurs="unbounded"/>
The modified schema is thus:
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema
targetNamespace="
http://www.tempuri.org/paper"
elementFormDefault="qualified"
xmlns="
http://www.tempuri.org/paper"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema">
<xsd:element name="paper">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="body" type="paper.Body" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="strong" type="StrongType"/>
<xsd:element name="emphasis" type="EmphasisType"/>
<xsd:element name="underline" type="UnderlineType"/>
<xsd:complexType name="StrongType" mixed="true">
<xsd:choice maxOccurs="unbounded">
<xsd:element ref="emphasis" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="underline" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="EmphasisType" mixed="true">
<xsd:choice maxOccurs="unbounded">
<xsd:element ref="strong" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="underline" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="UnderlineType" mixed="true">
<xsd:choice maxOccurs="unbounded">
<xsd:element ref="strong" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="emphasis" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="paper.Body">
<xsd:sequence>
<xsd:element name="section" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="paragraph" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType mixed="true">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="emphasis" minOccurs="0" maxOccurs="unbounded" />
<xsd:element ref="strong" minOccurs="0" maxOccurs="unbounded" />
<xsd:element ref="underline" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="superscript" type="xsd:string" />
<xsd:element name="subscript" type="xsd:string" />
<xsd:element name="B" type="xsd:string" />
<xsd:element name="I" type="xsd:string" />
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Even though the previous schema was perfectly valid and the xmax tool itself validates it, I do not know why it does not work in the previous form. This does however work and I have tried it in a sample .net application (which is attached).
Regards
SteveS