Re: does this valid in xml schema?

1) You should be using
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
which corresponds to the W3C XML Schema Recommendation
issued on May 2, 2001.  (Assuming any editors or validators
which you are using that read the schema understand the new
Rec.  Many of them do).

2) What you are trying to do is legal, but your syntax is incorrect.
The <choice> and <sequence> need namespace prefixing,
so they should appear as <xsd:choice> and <xsd:sequence>
(and the same for their end tags).

Reminder: If you are not sure if a schema is legal, you
can use the Web version of XSV or the downloadable
XML Schema Quality Checker tool from IBM alphaWorks
to check schemas.  Both give messages explaining errors.
You can find links to them at http://www.w3.org/XML/Schema
under Tools.

Note to all readers of the list: XML Schema Quality Checker
has been refreshed with version 1.2 this week.  This version
includes complete checking of the xpath's given in identity-definition
constraints against the structures shown by the complexTypes
in your schema, as well as a lot of small improvements.
Feedback most welcome at all times.

Regards,
Bob

Bob Schloss
Next Gen Web group
IBM T. J. Watson Research Center
Yorktown Heights, New York, USA
http://www.research.ibm.com/people/s/bschloss





liying <lsui@cs.ucsd.edu>@w3.org on 07/13/2001 08:30:51 AM

Sent by:  xmlschema-dev-request@w3.org


To:   xmlschema-dev@w3.org
cc:
Subject:  does this valid in xml schema?



I have a question
I don't know whether or not this is a valid xml schema

thanks for help me

<xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema">

                    <xsd:element     name="shipOrder" type="order"/>

                    <xsd:complexType name="order">
                     <choice>
                      <sequence>
                           <xsd:element   name="shipTo"
type="shipAddress"/>
                           <xsd:element   name="items"
type="cdItems"/>
                      </sequence>
                      <sequence>
                            <xsd:element   name="mailfrom"
type="string"/>
                           <xsd:element   name="items"
type="string"/>
                      </sequence>
                     </choice>
                    </xsd:complexType>

         ......definition of shipAddress and cdItems

                    </xsd:schema>


In short, my question is can those two item element appears as this way
under a big choice but with different definition

Received on Wednesday, 22 August 2001 11:29:14 UTC