Re: [whatwg] [Selectors4] case-insensitive attribute value matching (in XML)

2012-06-05 Thread Ian Hickson
On Sat, 21 Jan 2012, Leif Halvard Silli wrote:
> Ian Hickson on Fri Jan 20 14:31:01 PST 2012:
> > On Tue, 26 Jul 2011, Christoph Päper wrote:
> >> Anne van Kesteren:
> >> > I'm still trying to get HTML and browsers to change so that attribute 
> >> > values always match case-sensitively, irrespective of markup language. 
> >> > The current magic attribute list in HTML whose values needs to be 
> >> > matched ASCII case-insensitively is just ugly.
> 
> > The spec changed recently in response to Anne's efforts here. If this is 
> > an area of interest, I encourage you to study the specification to see if 
> > the current requirements are satisfactory.
> 
> The matching rule for attribute names and element names, [1] doesn't 
> match reality, see demo: [2]
> 
> * Gecko uses ASCII case-insensitive matching (as specced by HTML5)
> * Trident/Webkit/Presto use Unicode caseless matching (variant).
>   (Legacy Firefox 3.6 behave like Trident/Webkit/Presto too.)
> 
> The differences affect @data-* and @x-* (and other extensions). 
> Shouldn't spec match Trident/WEbkit/Presto?
> 
> [1] http://dev.w3.org/html5/spec/links#case-sensitivity
> [2] http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1307

On Fri, 3 Feb 2012, Anne van Kesteren wrote:
> 
> The HTML parser only lowercases A-Z so that behavior is somewhat 
> surprising. Quick testing shows it also happens in the DOM (in 
> Presto/WebKit at least). I think it should be treated as a bug in 
> Trident/WebKit/Presto given how the HTML parser behaves, personally.

I agree with Anne. Unless there's a compelling compatibility reason, the 
ASCII variant seems better. It has the advantage of being more performant, too.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Re: [whatwg] [Selectors4] case-insensitive attribute value matching (in XML)

2012-02-02 Thread Anne van Kesteren
On Sat, 21 Jan 2012 16:23:31 +0100, Leif Halvard Silli  
 wrote:

Ian Hickson on Fri Jan 20 14:31:01 PST 2012:

On Tue, 26 Jul 2011, Christoph Päper wrote:

Anne van Kesteren:
> I'm still trying to get HTML and browsers to change so that attribute
> values always match case-sensitively, irrespective of markup  
language.

> The current magic attribute list in HTML whose values needs to be
> matched ASCII case-insensitively is just ugly.



The spec changed recently in response to Anne's efforts here. If this is
an area of interest, I encourage you to study the specification to see  
if

the current requirements are satisfactory.


The matching rule for attribute names and element names, [1] doesn't
match reality, see demo: [2]

* Gecko uses ASCII case-insensitive matching (as specced by HTML5)
* Trident/Webkit/Presto use Unicode caseless matching (variant).
  (Legacy Firefox 3.6 behave like Trident/Webkit/Presto too.)

The differences affect @data-* and @x-* (and other extensions).
Shouldn't spec match Trident/WEbkit/Presto?


The HTML parser only lowercases A-Z so that behavior is somewhat  
surprising. Quick testing shows it also happens in the DOM (in  
Presto/WebKit at least). I think it should be treated as a bug in  
Trident/WebKit/Presto given how the HTML parser behaves, personally.




[1] http://dev.w3.org/html5/spec/links#case-sensitivity
[2] http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1307



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


Re: [whatwg] [Selectors4] case-insensitive attribute value matching (in XML)

2012-01-21 Thread Leif Halvard Silli
Ian Hickson on Fri Jan 20 14:31:01 PST 2012:
> On Tue, 26 Jul 2011, Christoph Päper wrote:
>> Anne van Kesteren:
>> > I'm still trying to get HTML and browsers to change so that attribute 
>> > values always match case-sensitively, irrespective of markup language. 
>> > The current magic attribute list in HTML whose values needs to be 
>> > matched ASCII case-insensitively is just ugly.

> The spec changed recently in response to Anne's efforts here. If this is 
> an area of interest, I encourage you to study the specification to see if 
> the current requirements are satisfactory.

The matching rule for attribute names and element names, [1] doesn't 
match reality, see demo: [2]

* Gecko uses ASCII case-insensitive matching (as specced by HTML5)
* Trident/Webkit/Presto use Unicode caseless matching (variant).
  (Legacy Firefox 3.6 behave like Trident/Webkit/Presto too.)

The differences affect @data-* and @x-* (and other extensions). 
Shouldn't spec match Trident/WEbkit/Presto?

[1] http://dev.w3.org/html5/spec/links#case-sensitivity
[2] http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1307
-- 
Leif Halvard Silli

Re: [whatwg] [Selectors4] case-insensitive attribute value matching (in XML)

2012-01-20 Thread Ian Hickson
On Tue, 26 Jul 2011, Christoph Päper wrote:
>
> Anne van Kesteren:
> > I'm still trying to get HTML and browsers to change so that attribute 
> > values always match case-sensitively, irrespective of markup language. 
> > The current magic attribute list in HTML whose values needs to be 
> > matched ASCII case-insensitively is just ugly.
> 
> Can’t that be changed to something like the following?
> 
>   When an attribute takes as a value
>   – a single keyword or
>   – a whitespace-separated list of keywords,
>   where all valid keywords are defined in this spexcification,
>   these keywords are ASCII case-insensitive.
>   All other attribute values are case-sensitive.
> 
> or just
> 
>   All element names, attribute names and attribute value keywords
>   defined in this specification are ASCII case-insensitive.
>   All other attribute values are case-sensitive.

The spec changed recently in response to Anne's efforts here. If this is 
an area of interest, I encourage you to study the specification to see if 
the current requirements are satisfactory.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Re: [whatwg] [Selectors4] case-insensitive attribute value matching (in XML)

2011-07-26 Thread Christoph Päper
Anne van Kesteren:
> I'm still trying to get HTML and browsers to change so that attribute values 
> always match case-sensitively, irrespective of markup language. The current 
> magic attribute list in HTML whose values needs to be matched ASCII 
> case-insensitively is just ugly.

Can’t that be changed to something like the following?

  When an attribute takes as a value
  – a single keyword or
  – a whitespace-separated list of keywords,
  where all valid keywords are defined in this spexcification,
  these keywords are ASCII case-insensitive.
  All other attribute values are case-sensitive.

or just

  All element names, attribute names and attribute value keywords
  defined in this specification are ASCII case-insensitive.
  All other attribute values are case-sensitive.