Re: attribute-value-selector-004.xht not well formed

On Tue, 10 Mar 2009 17:59:55 -0000, Arron Eicholz  
<Arron.Eicholz@microsoft.com> wrote:
> The rule is in 5.8.1 "Attribute values must be identifiers or strings."  
> Also Appendix G requires that "attrib" be an IDENT and an IDENT cannot  
> start with a number. IDENT is defined as ident which is  
> -?{nmstart}{nmchar}. nmstart cannot have a number because it is required  
> to start with a [_a-z]|{nonascii}|{escape} Maybe this case also have a  
> help link for Appendix G as well.
>
> Ahh, that is the key about testing correct implantation. We are testing  
> an unknown implementation. We cannot assume that it is correct or not.  
> The tests tell us if the implementation is correct or not.
>
> Look at it this way. What if an implementation accepts and stores the  
> '1badattr' attribute? And is also accepted the attribute selector as  
> well, if it does that then the selection will most likely happen. This  
> is a valid test scenario. This could in theory happen if and  
> implementation does not properly handle IDENT's correctly.

If it accepts the attribute it would not drop a "p, [1badattr]" rule and  
therefore make the style red as dbaron suggests. This is has nothing to do  
with whatever the markup language does and is completely done at the CSS  
parsing level. In any implementation of CSS you can never reach the  
scenario you are describing so it makes no sense to test it in that  
particular way. (And if you really must, you can test it by matching the  
attribute value using an IDENT rather than the attribute name as I  
suggested earlier.)


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Tuesday, 10 March 2009 18:09:59 UTC