W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2004

RE: Derivation by restriction

From: Jack Lindsey <tuquenukem@hotmail.com>
Date: Thu, 08 Apr 2004 18:15:45 -0400
To: Xan.Gregg@jmp.com, xmlschema-dev@w3.org
Message-ID: <BAY12-F29GGPtt1Lni3000357d5@hotmail.com>

Thanks Xan.

I am in this case very pleased to be proven wrong, and I have just 
demonstrated it to myself in Spy (guess I should have done that first ;-)

I misinterpreted an example in a book I was just reading which said that the 
original model had to be replicated and then any relevant constraints 
tightened.  The example focussed on adding maxOccurs="0" to an element that 
already had minOccurs="0" to effectively eliminate it from the subtype.  I 
interpreted that to mean that original constraints also had to be replicated 
and just further qualified by additional constraints.

It did then point out that simply omitting the element from the restriction 
achieved the same result.

It also pointed out that omitting an attribute from the restriction has a 
different effect.  It means the attribute is required unchanged.  I think 
this is when I got really confused.  Perhaps I should just read the 
spec....then again!

Cheers Jack


>From: "Xan Gregg" <Xan.Gregg@jmp.com>
>To: "Jack Lindsey" <tuquenukem@hotmail.com>,<xmlschema-dev@w3.org>
>Subject: RE: Derivation by restriction
>Date: Thu, 8 Apr 2004 16:30:08 -0400
>
>Your premise is incorrect.  You can have a restriction that makes an 
>optional element mandatory.  Or is there some other constraint involved 
>that is not apparent in your message?
>
>xan
>
>-----Original Message-----
>From:  Jack Lindsey
>Sent: Thursday, April 08, 2004 4:24 PM
>To: xmlschema-dev@w3.org
>Subject: Derivation by restriction
>
>Would I be correct in concluding that when deriving a complex type by
>restriction, while it is possible to make an optional attribute mandatory 
>in
>the subtype, it is not possible to make the presence of an element
>mandatory?
>
>If so, why not?  If this does not offend the concept of inheritance
>overriding in the case of an attribute why has this facility not been
>implemented for elements?

_________________________________________________________________
Tax headache? MSN Money provides relief with tax tips, tools, IRS forms and 
more! http://moneycentral.msn.com/tax/workshop/welcome.asp
Received on Thursday, 8 April 2004 18:16:16 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:11 UTC