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

RE: Is this valid schema??

From: Morris Matsa <mmatsa@us.ibm.com>
Date: Tue, 20 Mar 2001 12:11:14 -0500
To: Ayalew Kassahun <A.Kassahun@InfoRay.NL>
Cc: xmlschema-dev@w3.org, ht@cogsci.ed.ac.uk
Message-ID: <OF6EBD3A4C.87247355-ON85256A15.005DB3E7@somers.hqregion.ibm.com>

The two <PART> elements can not have different types.  What I think you can
do is specify the value of the PART element's NAME attribute to be an
enumeration of "HEADER" and "CONTENT" so that those are the only allowed
values, and then use a <unique> element (in the schema) to make sure that
each only appears once in the <result> element.  Finally, your schema just
says that a <result> must have two <part> elements, and each must have a
unique attribute for the NAME attribute, which only has two possibilities.

As far as I can tell, the only difference between this and your ideal is
that HEADER and CONTENT can appear in either order.  If you want them in
only one order, you can't do that with Schemas yet.  Just document it.


Ayalew Kassahun <A.Kassahun@InfoRay.NL>@w3.org on 03/20/2001 11:42:18 AM

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

To:   xmlschema-dev@w3.org
cc:   ht@cogsci.ed.ac.uk
Subject:  RE: Is this valid schema??

But that is exactly what I want to have (ok to same effect), how do I
specify that?
What I mean is I want to have

whereby the PART's (of which i have a long list) should always have the
given attribute and attribute-value (fixed) and each occur only once.

thanks in advance for any suggestions,
Received on Tuesday, 20 March 2001 12:12:12 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:51 UTC