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

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 UTC