[CSS2.1] Default attribute values in DTDs

Section 5.8.2 contains an example of usage of attribute selectors that seems to be contraversial.

	<blockquote cite="http://www.w3.org/TR/2006/WD-CSS21-20060411/selector.html#q11">
	For example, consider an element EXAMPLE with an attribute "notation" that has a default value of "decimal". The DTD fragment might be 
		<!ATTLIST EXAMPLE notation (decimal,octal) "decimal">
	If the style sheet contains the rules 
		EXAMPLE[notation=decimal] { /*... default property settings ...*/ }
		EXAMPLE[notation=octal]   { /*... other settings...*/ }
	the first rule will not match elements whose "notation" attribute is set by default, i.e. not set explicitly.
	</blockquote>

It is misleading as default attribute value fetching is performed by XML parser
before document tree is passed to rendering engine, so CSS rendering engine should not care whether attribute was set explicitly by author or added by XML parser. Either remove misleading comments or at least change "the first rule will not match elements whose 'notation' attribute is set by default"
to "depending on type of XML parser and the way default attribute value was declared the first rule may or may not match elements whose 'notation' attribute is set by default"
For instance if value is declared in internal DTD subset before any external entities then ANY xml parser including non-validating ones MUST supply attribute with their defaults (if they are not specified in document) and when applying CSS selectors browser should take attributes with default values supplied by parser into account (why not?). 
Here is test page that works properly in Opera, Mozilla and Prince:
	http://www.geocities.com/csssite/temp/attributes.xml

/* Abovementioned comments in CSS2.1 create (wrong) impression that these UAs render page incorrectly */

-- 
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 8 at http://www.opera.com

Powered by Outblaze

Received on Friday, 14 April 2006 13:25:29 UTC