[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML Schemas: Best Practices
> No, using <restriction> does not allow me to put a Reviewer element at > the top of Book's content model. Oof... must have been late-- I don't know what I was thinking. You are absolutely correct. > I don't know what you mean by "multiple layers of inheritance". Could > you expand upon this please? Thanks! /Roger What I meant was certain types may be extended multiple times by different people. I think the example of BookType is a good one <complexType name="BookType"> <sequence> <element name="Title" type="string"/> <element name="Author" type="string"/> <element name="Date" type="year"/> <element name="ISBN" type="string"/> <element name="Publisher" type="string"/> </sequence> </complexType> <complexType name="NonfictionBookType"> <complexContent> <extension base="c:BookType"> <sequence> <element name="Reference" type="boolean"/> </sequence> </extension> </complexContent> </complexType> <complexType name="EncyclopediaBookType"> <complexContent> <extension base="c:NonfictionBookType"> <sequence> <element name="Volume" type="string"/> </sequence> </extension> </complexContent> </complexType> and so on... "multiple layers of inheritence" is probably bad use of the terms, but in the above we can see that EncyclopediaBookType extends NonfictionBookType extends BookType. It seems that if we are planning for extension we often need to consider that those extensions will be extended, will be extended... Thanks, Jeff Rafter
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|