OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   deriving by restriction

[ Lists Home | Date Index | Thread Index ]
  • From: Ajay K Sanghi <sanghi@giasdl01.vsnl.net.in>
  • To: xml-dev@lists.xml.org
  • Date: Mon, 02 Oct 2000 20:25:54 +0530


Reference: XML Schema Part 0: sep 22, 2000 draft

Section 4.4 (Deriving Complex Types by Restriction), page 35 of 60 states
"Note that all ConfirmedItems type elements will also be acceptable as Item
type elements"

My question is - "is this correct?"

In the example, ConfirmedItems is derived by restriction and minOccurs is
changed to "1" (from "0" in base type) - if only this was the case, I agree
ConfirmedItems are acceptable as Item type elements also.

However, the remainder of the definition of Items is reproduced in the
example (which i believe is not for easier reference but because the same is
required). The same could have been further restricted to exclude say
productName (whose minOccurs by default is 1 in the base "Item". Is this an
error case. if yes, then why do we have to reproduce the entire baggage?)
from the Item sequence. Clearly, "ConfirmedItems" now will not be
"acceptable" as "Item". i.e. ConfirmedItems are not "valid" Item (thinking
coming from OO world).

I am distinguishing between -
ConfirmedItems as subset of Item from
ConfirmedItems as also being a valid Item.

What am I missing in my understanding?

Thank you and regards,

Ajay





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS