Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


new to schema: Unique Particle Attribution

From: Kostas Karadamoglou <karadamoglou_k@-----.-->
To: xmlschema-dev@--.---
Date: 4/5/2005 10:17:00 AM
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

or:

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:sequence>
            <xs:element ref="title" minOccurs="0" maxOccurs="1"/>
            <xs:element ref="content"/>
            <xs:element ref="weight"/>
        </xs:sequence>
    </xs:group>

    <xs:group name="complexQuestionItems">
        <xs:sequence>
            <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" 
maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:group>

    <xs:element name="question">
        <xs:complexType>
            <xs:choice>
                <xs:group ref="simpleQuestionItems"/>
                <xs:group ref="complexQuestionItems"/>
            </xs:choice>
            <xs:attribute name="required" type="xs:boolean" 
default="false"/>
        </xs:complexType>
    </xs:element>



From Burak.Emir@e... Wed Apr 06 08:39:12 2005
Received: from lisa.w3.org ([128.30.52.41])
	by


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent