Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!sun-barr!newstop!eastapps!dosai!eswarp From: eswarp@dosai.East.Sun.COM (Eswar Priyadarshan - Sun BOS Software) Newsgroups: comp.text.sgml Subject: Class vs. Instance Attributes Keywords: attributes Message-ID: <6271@eastapps.East.Sun.COM> Date: 22 May 91 13:32:13 GMT Sender: news@East.Sun.COM Reply-To: eswarp@East.Sun.COM Organization: Sun Microsystems, Billerica MA Lines: 29 I have another in the series of philosophical questions being asked about attributes. In the application we're contemplating, we seem to be running into what could be viewed as 2 types of attributes of an element: 1. attributes whose value is the same for all instances of the element. That is, the attributes are used to distinguish one element from all others. For example, all text tagged Foo is to be considered confidential. The DTD would define an attribute for Foo whose only/default value would be, to use the example, CONFIDENTIAL=Yes. 2. attributes whose value differs from instance to instance. That is, the DTD would define a set of possible values an attribute can have for text tagged Foo. Each instance of the element Foo could have a different attribute value within that set. Is the use of an attribute in case 1 ok? Seems to me that instead of using attributes in case 2, nested tags should be used. Use attributes only when talking about every instance of an element? Comments? Eswar (eswarp@East.Sun.COM)