class inheretance (Was: Future of HTML)

Dataweaver (traveler@io.com)
Thu, 26 Mar 1998 18:39:44 -0600 (CST)


Date: Thu, 26 Mar 1998 18:39:44 -0600 (CST)
From: Dataweaver <traveler@io.com>
To: "Martin J. Duerst" <duerst@w3.org>
cc: Jukka Korpela <jkorpela@cc.hut.fi>, david_richmond@nl.compuware.com,
In-Reply-To: <199803270006.JAA11994@sh.w3.mag.keio.ac.jp>
Message-ID: <Pine.BSI.3.96.980326181111.19039C-100000@xanadu.io.com>
Subject: class inheretance (Was: Future of HTML)

On Fri, 27 Mar 1998, Martin J. Duerst wrote:
> At 11:41 98/03/26 -0600, Dataweaver wrote:
> > On Thu, 26 Mar 1998, Jukka Korpela wrote:
> > > On Thu, 26 Mar 1998 david_richmond@nl.compuware.com wrote:
> > > >      As for the best way of doing this I am not sure, but adding a 
> > > >      <DATATYPE> tag would be one way.
> > > 
> > > Well, a bit long name. The element for "data type markup" could be
> > > called just DATA. For example,
> > >   <DATA TYPE="date">1998-03-26</DATA>
> > 
> > How would this differ from <DIV class="date">?  
> 
> If you ever want to do that, I suggest you use <SPAN class="date">
> instead of DIV.
> 
> Regards,   Martin.

Oh; oops...

You're right.  IIRC, SPAN is supposed to be the general-purpose inline
element, while DIV is intended as the general-purpose block element; and
the class attribute is supposed to let you specify conceptual differences
amongst otherwise-identical tags.  

On that note, would HTML (conceptually) be the right place to introduce
class "inheritance", or would that belong in CSS?  I suspect the former,
 due to the fact that class inheritance would fundamentally be
content-related, rather than presentation-related, but I'm unsure, as the 
only benefits that I can see relate to style-sheets (of course, the only
benefits that I see for the class attribute in general involve
stylesheets, so that's not a big surprise...).  

This is strictly hypothetical, and I'm not at all sure that it would be
either practical or desirable to implement, but I'm thinking along the
lines of a new element, intended strictly for use in the header, with the
sole purpose of specifying relationships among various classes in the
document (I do _not_ like this approach, but I can't think of a better one
right now; if anyone else can, I'm all ears...).  Something along the
lines of:

<RELATION class="date" parent="datetime">
<RELATION class="time" parent="datetime">

At that point, anything that acts on elements with the "datetime" class
would also act on elements with either the "date" class or the "time"
class, or both, while anything that acts specifically on elements with the
"date" class would have no effect on elements with the "datetime" class or
the "time" class (assuming that they also don't have the "date" class, of
course...).  

---- Jonathan Lang <traveler@io.com> ---- x ------- alias: Dataweaver ---------
  Webpage:  http://www.io.com/~traveler  /@\ The Dogma of Otherness insists
  GURPSnet's Benevolent Tyrant for Life  ~~~ that all voices deserve a hearing,
FAQ: http://www.io.com/~ftp/GURPSnet/www  |  that all points of view have
Archive: http://www.io.com/~ftp/GURPSnet  |  something of value to offer.
submit new files to gurpsnet-files@io.com |  --David Brin, "Otherness"