Re: A possible presentational hints proposal for CSS 2.1

On Tuesday, October 8, 2002, 5:28:07 PM, Stuart wrote:


SB> 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.

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

Since this text differentiates between HTML and XHTML, we can clearly
say that the number of new attributes that get added to standard HTML
will be zero.

>>>> 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.

SB> May I suggest including language that allows other XML vocabularies to 
SB> explicitly designate attributes as presentational if they want to?


Such as, for example, languages that are themselves presentational?
That would be a lot better than merely looking at HTML and deciding
that all XML has no presentational attributes.

Rather than talk about 'transitional phases' and so forth, i suggest:

a) distinguishing between presentational and non-presentational XML
grammars. For example, MathML has two grammars, one of each type.

b) stating that non-presentational grammars should not have, or add,
presentational attributes.

c) stating that presentational attributes should have the exact same
name, syntax, and semantics as the corresponding property. They then
become zero-specificity "default styling" which is readily "restyled"
by any CSS selector. this is, for example, the case in CSS.

While being more realistic and less antagonistic to other W3C
specifications, this approach also - by encouraging use of stylistic
attributes, rather than the style attribute, for presentational
grammars - encourages restylability. Currently, lots of tools that
construct content incrementally spit out xml elements with style
attributes on each element. Due to the high specificity of the style
attribute, this makes later restyling hard in CSS2 and impossible in
CSS 2.1

If CSS 2.1 wants to make the style attribute have infinite
specificity, then CSS 2.1 also needs to encourage, not discourage, the
use of a zero-specificity alternative for tools such as XSL-T to
generate.

SB> I
SB> wouldn't be surprised if other languages (I'm thinking of DocBook, for 
SB> example, although I don't know enough about it to know if it applies or 
SB> not) also have a legacy issue of presentational attributes.

Presentation attributes are not just a legacy issue.

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

SB> I'm also not sure whether I agree with the choice to make no attributes 
SB> presentational in XHTML. The fact that XHTML transitional exists at all 
SB> suggests a desire to provide a version of XHTML in which presentational 
SB> attributes are honored.


Correct.

SB> Thus, I'd suggest treating XHTML Transitional as
SB> HTML,

No!! Its XML, uses the XML Object Model, etc. Don't muddy things
further by treating some XML as HTML.

SB> How about this wording, based on your original:

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

That is an improvement.

SB>   For other XML languages where the document type or schema

or namespace (for namespace qualified attributes)

SB> is known, the
SB>   UA MAY treat certain attributes as presentational if it has specific
SB>   knowledge that this is appropriate to the particular document type in
SB>   question: for example, a recommendation from those responsible for
SB>   defining the document type.


I agree that the definition and correct interpretation of XML
attributes used in a particular specification is the responsibility of
the authors of that specification, not of CSS.

SB> In the absence of such specific knowledge,
SB>   no attribute should be considered presentational.

This is where I really wish that the presentation attributes in XSL
(and in SVG) had been defined in their own namespace. I still think
that would have been a better solution.

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

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

SB> Stuart.




-- 
 Chris                            mailto:chris@w3.org

Received on Tuesday, 8 October 2002 12:20:31 UTC