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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: XSchema Spec Section 2.2, Draft 1

[ Lists Home | Date Index | Thread Index ]
  • From: "Michael Kay" <M.H.Kay@eng.icl.co.uk>
  • To: "XML Dev" <xml-dev@ic.ac.uk>
  • Date: Fri, 12 Jun 1998 10:47:37 +0100

>> 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@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

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

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