Elements inside simpleType?

I'm trying to do a schema for XML:

<comments allowremove="true" markerlimit="1300">
    <comment id="c0" type="cd1">Some text 
      <comment id="c1" type="cd5">Another text</comment> 
    </comment>
    <comment id="c2" type="cd3">More text</comment>
</comments>

and come up with

<complexType name="commentsType">
    <element name="comment" type="doc:commentType" minOccurs="0" maxOccurs="unbounded"/>	        <attribute name="allowremove" type="boolean"/>
    <attribute name="markerlimit" type="int"/>
</complexType>

<complexType name="commentType" base="string" derivedBy="extension">
    <element name="comment" type="doc:commentType" minOccurs="0" maxOccurs="unbounded"/>
    <attribute name="id" type="doc:commentId"/>
    <attribute name="type" type="doc:commentDefId"/>
</complexType>

Parser says: "can't have elements inside simpleType"

Does anyone know a way to do it?

Lassi Nirhamo

Received on Monday, 16 October 2000 03:11:24 UTC