Hi, quick question about a schema I can't seem to get to work.

I have Inline styles throughout my xml documents ie bold and italic tags. to handle this I have made a complexType named Inline:

<xsd:complexType name="Inline" mixed="true">
<xsd:element ref="_Inline" minOccurs="0" maxOccurs="unbounded"/>

<xsd:element name="_Inline" type="xsd:anyType" abstract="true"/>
<xsd:element name="bold" substitutionGroup="_Inline"/>
<xsd:element name="italic" substitutionGroup="_Inline"/>

Ok, so cool. Now this gives me the abitlity to use my bold and italic tags within elements by simply declaring them as such:

<xsd:element name="someelement" type="Inline"/>

The problem comes around now where I have an element that has a nested tag but still requires the Inline styles, and example of the xml is below:

<problemelement><num>1</num> This is <bold>a problem</bold> element</problemelement>

Here I get "Element 'bold' is not valid for content model: '(_Inline,,(num|))'". So far what I have in my schema is:

<xsd:element name="problemelement">
<xsd:complexContent mixed="true">
<xsd:extension base="Inline">
<xsd:choice maxOccurs="unbounded">
<xsd:element name="num" type="Inline" minOccurs="0"/>

I guess I should also mention that problemelement may or may not contain the element <num>.

Thanks for any help any of you can offer.