W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2001

[xmlschema-dev] <none>

From: Ben Marchal (Mailing Lists) <bulk@pineapplesoft.com>
Date: Fri, 09 Mar 2001 10:39:39 +0100
Message-Id: <4.3.2.7.2.20010309103758.00c21b00@mail.brightmail.com>
To: xmlschema-dev@w3.org
Hello

I'm preparing a new paper on XML Schema and two issues are unclear to me. 
Id be grateful for any clarifications.

Specifically, when an element contains a sequence of elements, I use 
xsd:complexType to define it. My question is do I have to insert a 
xsd:sequence element in there or can I just list the element?

The primer uses sequence in every example as in:

<xsd:complexType name="Address">
    <xsd:sequence>
       <xsd:element name="street" type="xsd:string"/>
       <xsd:element name="city" type="xsd:string"/>
    </xsd:sequence>
</xsd:complexType>

but I have found examples without it, as in:

<xsd:complexType name="Address">
    <xsd:element name="street" type="xsd:string"/>
    <xsd:element name="city" type="xsd:string"/>
</xsd:complexType>

I could not find in the standard (part 1) a clear answer on which one is right.

The second issue is I'm not sure I understand the practical differences 
between xsd:group and xsd:sequence.

Thanks for any help, pointer, etc.

--ben
Benoît Marchal, www.pineapplesoft.com

As eCommerce Grows, Understanding XML Becomes a Key Job Skill
XML by Example / $24.99 / ISBN 0-7897-2242-9 / www.worth-it.com
Applied XML Solutions / $44.99 / ISBN 0-6723-2054-1 / www.worth-it.com
Received on Friday, 9 March 2001 04:41:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:20 GMT