Re: A possible presentational hints proposal for CSS 2.1

Ian Hickson wrote:
> On Tue, 8 Oct 2002, Rijk van Geijtenbeek wrote:
> 
> 
>>> For HTML, any attribute that is not in the following list should be
>>> considered presentational: [...]
>>
>>If you write the other list, it would be shorter:
> 
> 
> The idea was to set the default to be presentational, since so many
> attributes are non-standard, and all the non-standard ones are
> presentational.

Why not enumerate the "standard" presentational attributes, and then say 
that additionally, all attributes not defined in the relevant 
specifications are presentational? That way any new attributes that get 
added to standard HTML are treated as non-presentational.

>>> For XHTML and other XML languages, no attribute should be considered
>>> presentational.
>>
>>I assume this has something to do with the discouragement of these
>>attributes in the long run, but some clarification would be nice.

May I suggest including language that allows other XML vocabularies to 
explicitly designate attributes as presentational if they want to? I 
wouldn't be surprised if other languages (I'm thinking of DocBook, for 
example, although I don't know enough about it to know if it applies or 
not) also have a legacy issue of presentational attributes.

The language would have to allow for the possibility that the UA might 
have to deal with XML content in vocabularies it doesn't understand, and 
permit it to treat no attributes as presentational in that case, but 
still allow it to treat attributes as presentational if it *does* 
understand the vocabulary.

I'm also not sure whether I agree with the choice to make no attributes 
presentational in XHTML. The fact that XHTML transitional exists at all 
suggests a desire to provide a version of XHTML in which presentational 
attributes are honored. Thus, I'd suggest treating XHTML Transitional as 
HTML, and all other versions of XHTML as XML.

How about this wording, based on your original:

  For HTML and XHTML 1.0 Transitional, any attribute that is in the
  following list should be considered presentational:

    align alink background bgcolor border cellpadding cellspacing char
    charoff clear color cols compact content face frame frameborder
    height hspace link marginwidth marginheight noresize noshade nowrap
    rows rules scrolling size tabindex target text valign vlink vspace
    width

  Additionally, any attribute that is not defined in the specification
  of the HTML version being used should be considered presentational. The
  determination of which HTML version is being used is UA-dependent.

  For all other versions of XHTML, no attribute should be considered
  presentational.

  For other XML languages where the document type or schema is known, the
  UA MAY treat certain attributes as presentational if it has specific
  knowledge that this is appropriate to the particular document type in
  question: for example, a recommendation from those responsible for
  defining the document type. In the absence of such specific knowledge,
  no attribute should be considered presentational.

  For all unknown XML languages, no attribute should be considered
  presentational.

  Elements and non-presentational attributes should be handled in the
  user agent stylesheet.

Stuart.

-- 
Stuart Ballard, Programmer
NetReach - Internet Solutions
(215) 283-2300, ext. 126
http://www.netreach.com/

Received on Tuesday, 8 October 2002 11:28:21 UTC