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

Re: XSchema Spec Section 2.2, Draft 1

  • From: "Michael Kay" <M.H.Kay@e...>
  • To: "XML Dev" <xml-dev@i...>
  • Date: Fri, 12 Jun 1998 10:47:37 +0100

xschema domain
>> Anyhow: when I first started using SGML, it really
bothered me that
>> attribute constraint declarations were not buried in
element type
>> declarations. But now I think that it is better to
strictly separate them.
>> It should be possible to attach attributes to any list of
elements
>> (including ALL). I think that SGML and XML had it right,
and we should go
>> back to that way of doing it.
>
The way this has evolved in database thinking (and the way
we did it in our data dictionary product 20 years ago) is to
separate the concept of attribute from that of domain. An
attribute-type belongs exclusively to an element-type (which
of course is called an entity-type in the database world),
and is inherited by subtypes of the element-type. The
attribute-type definition defines the domain (or data type)
to which attribute values belong, and this domain definition
may be shared by many different attribute-types.

I think the question raised in this discussion arises
because we are using a single declaration for both the
attribute type and its domain.

If an attribute can validly appear on ANY element-type, this
is only because all those element-types inherit from some
implicit super-type. I think all cases of several
element-types having the same attribute-type (as distinct
from several attribute-types sharing the same domain
definition) should be handled by inheritance.

So the model should be:

* Element-type inherits from Element-type (many to one, or
many to many if you prefer)
* Element-type has Attribute-Type (one-to-many)
* Attribute-type belongs to Domain (many-to-one)

Incidentally I think the concept of domain is equally valid
for defining the syntax of element content, and ought to
replace the ad-hoc mechanism of parameter entities which we
often use today when two element-types have content in the
same domain.

Mike Kay


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...)


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.