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

Objectives of Inheritance

  • From: "Arnold, Curt" <Curt.Arnold@h...>
  • To: "'xml-dev@i...'" <xml-dev@i...>
  • Date: Tue, 28 Jul 1998 10:35:40 -0600

inheritance objectives
> First of all, I've been working with the January XML-Data DTD and
> haven't had a chance to really get my mind around XSchema, so any XML
> fragments in here will be XML-Data like instead of XSchema like.  
> I've been building a fairly complex Schema using an XML-Data
> definition converted to a DTD.  I've been making extensive use of
> inheritance, and have observed that I'm using inheritance to
> accomplish three objectives.  If XSchema provides or could provides
> methods to readily accomplish these objectives, then we might be able
> to sidestep poorly defined or difficult to implement constructs (For
> example, I've avoided attempting to merge the child's content model
> with the parent's content model)
> For the discussion, lets assume that I am building a Schema to contain
> mathematical correlations.  I have a generic CORRELATION element that
> has CLASSID and CODE attributes to specify the COM or Java object that
> implements the correlation, plus RANGE and PARAM elements that contain
> the range that the correlation is valid and any parameters needed for
> the implementation.  I also want to define a POLYNOMIAL element that
> is a specific type of CORRELATION that I anticipate that the
> application would implement internally.
> Objective 1: Membership in a group
> The first objective is to define a group that contains CORRELATION and
> any "derived" elements, so that I can use POLYNOMIAL anywhere that I
> could use CORRELATION.  This is roughly equivalent to being able to
> cast a Polynomial class pointer down to a Correlation class pointer.
> Objective 2: Reusing content model
> The next objective is replicate all or part of the content model of
> the parent.  If CORRELATION allows a RANGE, then I would like it to be
> natural for POLYNOMIAL to have a range.  This (and the next) objective
> are frequently accomplished in DTDs using parameter entities.
> Objective 3: Reusing attributes
> The next objective is replicate all or part of the attribute list of
> the parent.  If CORRELATION allows a NAME attribute, then I would like
> it to be natural for POLYNOMIAL to have a NAME.
> Without really looking at what is in XSchema, it would seem that these
> could be accomplished relatively simply.  The following pseudo-XML
> demonstrates what I was thinking.
>      <GROUP ID="CORR-DERIVED" NAME="CORRELATION and related elements">
> 		</GROUP>
> 		<!--    would be necessary to have some concept of
> attribute group so you can replicate a whole
>                                           bunch of attributes     -->
> 		<!--   just borrow the content model of CORRELATION -->
> 		<!--     add a few new attributes to those defined by
>      </GROUP>
>      <ELEMENT ID="OTHER">		
>             <GROUP ID="OTHER-CONTENT">
>                <GROUP HREF="#CORR-DERIVED"/>
> 	</GROUP>
>      </ELEMENT>
> Questions:
> Are there any objectives of inheritance that I overlooked?
> How readily does XSchema accomplish each of the objectives? 
> Are there any minor enhancements to XSchema that would make these
> objectives more achievable?

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


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.
First Name
Last Name
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.