|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSchema Spec Section 2.2, Draft 1
>> 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! 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
|
|||||||||

Cart








