Hi Thomas, all,
[EMAIL PROTECTED] wrote:
Robin Berjon <[EMAIL PROTECTED]> wrote:
However at the level of the DOM, this isn't needed. It's the same thing
as "ignoring" elements in a namespace you don't know -- you still put
them in the DOM.
This is a very poor analogy. The DOM needs to know nothing about
attributes to behave correctly an attribute is just an attribute and
it has DOMString as it's value. This is not at all the case for CSS
properties, they are complex typed entites, with complex rules about
inheritance and default values.
You may not like my analogy, but it nevertheless is the conformant
behaviour required by the CSSStyleDeclaration interface of DOM 2 Style
for CSS. It's specified in no uncertain terms:
"""
While an implementation may not recognize all CSS properties within a
CSS declaration block, it is expected to provide access to all specified
properties in the style sheet through the CSSStyleDeclaration interface.
Furthermore, implementations that support a specific level of CSS should
correctly handle CSS shorthand properties for that level. For a further
discussion of shorthand properties, see the CSS2Properties interface.
"""
Yes, implementations that know some properties will behave different
from implementation that don't. That's specified normatively. Note that
the situation is exactly the same in the approach you advocate:
implementations behave differently depending on what they know. At least
with the standard behaviour you get the information and can try to
handle the situation, whereas if you delete the properties then all is lost.
Note that this is at the CSS declaration level, which is separate from
the elements level. Still, letting the end user decide which information
is pertinent to her is a sounder approach. Yes you can't inherit and you
can't compute, but at least you let someone who knows the problem
they're trying to solve much better than you do decide how to best
handle the situation.
--
Robin Berjon
Senior Research Scientist
Expway, http://expway.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]