Re: XML Schema Question

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 UTC