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

Re: XML Schema Question

From: Martin J. Duerst <duerst@w3.org>
Date: Sat, 13 Jan 2001 01:43:46 +0900
Message-Id: <4.2.0.58.J.20010113014152.037e3800@sh.w3.mag.keio.ac.jp>
To: "Joseph M. Reagle Jr." <reagle@w3.org>, "Ashok Malhotra" <petsa@us.ibm.com>
Cc: henry@w3.org, "Michael Sperberg-McQueen" <cmsmcq@w3.org>, xmlschema-dev@w3.org, Brian LaMacchia <bal@microsoft.com>, "Donald Eastlake" <dee3@torque.pothole.com>, <lde008@dma.isg.mot.com>
At 01/01/11 16:40 -0500, Joseph M. Reagle Jr. wrote:
>Hi Ashok. I don't think this would do the trick (they are all optional, 
>but there must be one of them because it'd be silly to have their parent 
>be empty), plus we couldn't meet the requirments of the SG since they are 
>of different types!

You can still use Ashok's approach, I guess. Just make a parent type
that you declare abstract and keep as general as possible (i.e.
'anything goes').

Regards,   Martin.



>Regardless, we'll go othe "silly" route, I just wanted to make sure I 
>wasn't missing some clever trick.
>
>At 09:31 1/11/2001 -0500, Ashok Malhotra wrote:
>
>>At 01/01/09 18:15 -0500, Joseph M. Reagle Jr. wrote:
>> >Is there a more elegant schema representation for the semantic of, "you
>> >can have a sequence of the following, and while I don't care which you
>> >have (they are all optional) you must have at least one of them."
>>
>>I've not been following this thread closely but it seems to me that
>>a substitutionGroup would provide the needed semantic.
>>Create a substitutionGroup with one of the optional items as
>>exemplar.  Put all the other items in the substitutionGroup.
>>Define the type to contain one or more or the exemplar.
>>
>>This design will allow multiple occurrences of one of the optional items.
>>Is this a problem?
>
>
>__
>Joseph Reagle Jr.
>W3C Policy Analyst                mailto:reagle@w3.org
>IETF/W3C XML-Signature Co-Chair   http://www.w3.org/People/Reagle/
>
Received on Saturday, 13 January 2001 06:08:46 GMT

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