Re: The attribute selectors [x|=a] and [x~=a]

On Wed, 15 Apr 1998, Ian Hickson wrote:

> I've been rereading the Proposed Recomendation [1] and I am having
> problems with the attribute selectors. 
> 
> (I know I mentioned this during the big regexp discussion a few weeks
> back, but now I've reread it I am getting worried again). 
> 
> Why have the two attribute selectors, one for space seperated lists and
> one for hyphen seperated lists? Why not just a single selector for an
> (author selected) seperated list? 
> 
> I suggest
> [att =val]
> [att-=val]
> which would be the two equivalents for ~= and |= respectively, and then
> you could also do
> [att/=val]
> for a slash seperated list (eg, a uri). (I admit the [att =val] is
> dangerous because the space isn't obvious).

It could be made less dangerous by saying that the default seperator is
whitespace (so [att=val], [att =val], [att= val], [att = val], etc. would
all mean the same thing), while the seperator can be specifically set to a
non-whitespace character (or possibly string) by prepending the desired
seperator to the =.  

---- Jonathan Lang <traveler@io.com> ----

Received on Thursday, 16 April 1998 16:35:48 UTC