From: Moore, Paul <Paul.M<oore@at...> - 2003-05-19 09:05:58
From: Beni Cherniavsky [mailto:cben@...]
[Quoted from Stefan]
>> Ok. Though I don't think it's a good idea to have a directive for
>> embedding arbitrary information I can see that there are reasons for
>> this desire. However, if it is really for arbitrary information, then
>> something like this is possible (using XML):
Nobody is suggesting "arbitrary" information (not even David, as far as
I understand things). What *is* seen by some people as being important
in practice, is to allow an extensible way of defining "sub-classes"
(term used deliberately!) of existing constructs. The most obvious use
of such sub-classes is in conjunction with style sheets, to apply
application-specific formatting, but there is no reason why other uses
could not be made.
The only further issue is that there is one type of text which cannot
be "subclassed" as it stands - namely, "normal" text. For that use, and
for that use *only*, the <prase> or <inline> element is being proposed.
It's basically "normal" inline text, which has been subclassed. (So a
<phrase> element with no class attribute is of no practical use).
The key points here are:
* The <phrase> element is solely to allow addition of a "class" =
to "normal" inline text.
* The class attribute is applied to existing elements, to allow them to
have an application-specific subclass.
* The writer is free to ignore the class attribute. That's in the nature
of subclassing: <cite class=3D"funny"> IS-A <cite> element, and can be
formatted as such. The class attribute is purely for writers which
prefer to allow finer distinctions.
> There is one particular constraint on what information shoudl be
> carried in the ``class`` attribute: it's ignorable information. It is
> not for arbitrary abuse of some_tag - it should be used that way when
> it merely expresses a variant of some_tag that can be simply ignored
> by writers that are not familiar with it and in any case doesn't
> require much special-casing in docutils code.
I agree - that's what I was trying to say above. The document content
should be complete in the absence of any ``class`` attributes. We're not
trying to add content here.
> Yes, that sounds very similar to the role of HTML's ``class``
> attribute, *when not abused*.
The "subclassing" idea I use above is also a good precedent for the
use of the term "class".