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

RE: Is this valid schema??

From: Ayalew Kassahun <A.Kassahun@InfoRay.NL>
Date: Tue, 20 Mar 2001 19:13:28 +0100
Message-ID: <7FAFD1931B62D411B2890050BAB19FB1453BA1@ms1.inforay.nl>
To: xmlschema-dev@w3.org
Cc: Morris Matsa <mmatsa@us.ibm.com>

> -----Original Message-----
> From: Morris Matsa [mailto:mmatsa@us.ibm.com]
> Sent: Tuesday, March 20, 2001 6:11 PM
> To: Ayalew Kassahun
> Cc: xmlschema-dev@w3.org; ht@cogsci.ed.ac.uk
> Subject: RE: Is this valid schema??
> The two <PART> elements can not have different types.
If I understand the structure implies that what matters is the elements
'full' name. Why is it not then possible to have differnt 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.
> Sorry.

thankyou. I think this may solve my problem. 
> Morris
> 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
>     <RESULT>
>      <EXTRA>
>     </RESULT>
> 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,
> ayalew
Received on Tuesday, 20 March 2001 12:59:20 GMT

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