[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

deriving by restriction

  • From: Ajay K Sanghi <sanghi@g...>
  • To: xml-dev@l...
  • Date: Mon, 02 Oct 2000 20:25:54 +0530

restriction and minoccurs

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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.