W3C home > Mailing lists > Public > www-style@w3.org > March 1998

Re: Suggestion for Attribute Selectors (and answer to Q[lang] problem)

From: Steven Pemberton <Steven.Pemberton@cwi.nl>
Date: Tue, 10 Mar 1998 12:57:22 +0100 (MET)
To: Ian Hickson <exxieh@bath.ac.uk>
Cc: Chris Lilley <chris@w3.org>, Bert Bos <Bert.Bos@sophia.inria.fr>, www-style@w3.org
Message-ID: <13573.9948.178054.574163@schoener.cwi.nl>
There is a change we could make to the semantics of |= that meets
Ian's proposal halfway, and actually makes |= easier to implement, and 
moderately more useful.

|= is currently defined on "hyphen-separated lists of
"words"". However it is only so-defined because that is the structure
of the LANG attribute.

New proposal: let it match the head of the attribute being used, based 
on the length of the string being compared.

So [LANG|="fr"] matches on the first two characters of LANG (language
codes are always two-letters, so this still works)

[LANG="en-nz"] still works, but

[HREF|="mailto:"] would then also work.

**** Note that according to HTML 4.0 the LANG attribute is case
**** insensitive, which means that |= must match case-insensitively!!!

Steven Pemberton
Received on Tuesday, 10 March 1998 06:59:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:54 GMT