Hi Arthur,
It's allowed - it's known as mixed content. I wouldn't recommend it for
anything other than free-form text (like books, HTML, etc.) but if you
have no control over it...
Here is a type that will validate it:
<xs:element name="foo">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element name="bar" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="attr" type="xs:int" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="attr" type="xs:int" use="required"/>
</xs:complexType>
</xs:element>
Hope that helps,
Priscilla
----------------------------------
Priscilla Walmsley
Author, Definitive XML Schema
http://www.datypic.com
----------------------------------
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!