Hi Jason,
Every element that can contain other elements has to have a complex
type. So you would definitely need complex types for "object" and
"things". For example:
<xs:element name="object" type="objectTyp e"/>
<xs:complexTy pe name="objectTyp e">
<xs:sequence>
<xs:element name="things" type="thingsTyp e"/>
</xs:sequence>
</xs:complexType>
<xs:complexTy pe name="thingsTyp e">
<xs:sequence>
<xs:element name="thing" type="xs:intege r"
maxOccurs="unbo unded"/>
</xs:sequence>
</xs:complexType>
Groups (i.e. xs:group elements) are used when you want to reuse pieces
of the content model in more than one complex type. For example, if
every "product" element had a name, number and description (among other
children), and every "warehouse" element had the same 3 children, plus
some other warehouse-specific things. You could create a group that is
comprised of name, number and description, then refer to that group from
the complex types of both the "product" and "warehouse" elements.
Hope that helps,
Priscilla
-----------------------------------------------------
Priscilla Walmsley
Author, Definitive XML Schema (Prentice Hall PTR)
http://www.datypic.com
-----------------------------------------------------
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!