Re: [whatwg] classList should perhaps move from HTMLElement to Element

Boris Zbarsky: 
>I agree it may not be that convenient for authors if a particular language 
>wants to use some other attr name for classes, but presumably they'd 
>have really good reasons for doing that if they do it at all?

If a markup language at all is based on another language than english
with another word for 'class', for example in german 'Klasse', obviously
for understandability and consistency of the whole language, it would
be not very nice or semantically meaningful to use 'class' as a name
for such an attribute. 
Theoretically this would be a task for an XML prefix, as for xml:id to
have a common class attribute for different markup languages.
Fortunately HTML is the only often used markup language without 
namespaces, therefore this might be the only language with the need
for another solution.
Once I had already the funny problem with an own XML format, that
some browsers applied the wrong CSS-styling to elements having an id
attribute with another meaning than an identifier (indicated in the 
obviously ignored DTD - I think, this happened, before the xml:id was
available). 
A class attribute without a related namespace may result in similar
problems, if a viewer does not identify it to have another meaning
in the current namespace within the document.

Olaf

Received on Tuesday, 23 November 2010 18:12:51 UTC