W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2000

Elements inside simpleType?

From: Lassi Nirhamo <lasnir@tkukoulu.fi>
Date: Mon, 16 Oct 2000 10:14:52 +0200
To: xmlschema-dev@w3.org
Message-Id: <20001016071500Z142921-7615+392@roope.top.tkukoulu.fi>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:47 UTC