[CSS21] DTD defaults are supposed to be ignored

In Section 5.8.2 "Default attribute values in DTDs" at
http://www.w3.org/Style/Group/css2-src/diffs-rec/selector.html#q11
this LC WD says:

  Matching takes place on attribute values in the document tree. 
  Default attribute values may be defined in a DTD or elsewhere, 
  but cannot be selected by attribute selectors.

First I note this wording is not compliant with RFC 2119, but I 
assume by "cannot" you mean "MUST not" as opposed to "SHOULD not".

I find this very objectionable.  This forbids an HTML-tree generating
processor from being compliant with SGML and XML.  In fact, for most
APIs to SGML/XML trees, there is no way to tell whether a given 
attribute value is set in the instance or in the DTD by defaulting.

Finally, this forbids some very useful scenarios where DTD-defaulted
attribute values are key to certain processing.

Granted, given that many (delivery) presentation systems do not read
the DTD, I could agree that:

  Style sheets SHOULD be designed so that they work even if the default
  values are not included in the document tree.

but I object to saying that it is non-compliant to the CSS spec for
any process--especially one such as an authoring tool or other special
processor--to base selector action on DTD defaults.  Certainly, there
are many XML processes that read the DTD when creating the document tree, 
and the current wording makes these tools non-complaint with CSS2.1.

paul

Received on Thursday, 9 October 2003 11:34:26 UTC