W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2005

new to schema: Unique Particle Attribution

From: Kostas Karadamoglou <karadamoglou_k@yahoo.gr>
Date: Tue, 05 Apr 2005 09:16:41 +0100
To: xmlschema-dev@w3.org
Message-ID: <d2thc3$8tp$1@sea.gmane.org>

Hi all,

I am new to xml schema and to this mailing list (if misuse it please 
inform me).

I would like to write an element (question) which does the following:

question can have either:

title(optional), content and weight


title, content(optional), weight(optional) and question

I tried to implement the above rules in an xml schema but I got a 
"Unique Particle Attribution". Below I provide you with the xml fragment 
that implement the rules. Can you tell me how I can implement these rules?

    <xs:group name="simpleQuestionItems">
            <xs:element ref="title" minOccurs="0" maxOccurs="1"/>
            <xs:element ref="content"/>
            <xs:element ref="weight"/>

    <xs:group name="complexQuestionItems">
            <xs:element ref="title"/>
            <xs:element ref="content" minOccurs="0" maxOccurs="1"/>
            <xs:element ref="weight" minOccurs="0" maxOccurs="1"/>
            <xs:element ref="question" minOccurs="1" 

    <xs:element name="question">
                <xs:group ref="simpleQuestionItems"/>
                <xs:group ref="complexQuestionItems"/>
            <xs:attribute name="required" type="xs:boolean" 
Received on Tuesday, 5 April 2005 23:54:03 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:07 UTC