W3C home > Mailing lists > Public > public-i18n-core@w3.org > January to March 2006

RE: I18n comment: inheritance of :lang and |=

From: Richard Ishida <ishida@w3.org>
Date: Tue, 14 Mar 2006 13:02:29 -0000
To: "'Richard Ishida'" <ishida@w3.org>, "'Ian Hickson'" <ian@hixie.ch>
Cc: <www-style@w3.org>, <public-i18n-core@w3.org>
Message-ID: <010c01c64767$8d7c3950$6501a8c0@w3cishida>

> From: public-i18n-core-request@w3.org 
> [mailto:public-i18n-core-request@w3.org] On Behalf Of Richard Ishida
> Sent: 14 March 2006 12:25
> To: 'Ian Hickson'
> Cc: www-style@w3.org; public-i18n-core@w3.org
> Subject: RE: I18n comment: inheritance of :lang and |=
> 
> 
> 
> > I've added the example from the CSS 2.1 spec (which is even more 
> > explicit). Let me know if that's ok or not:
> > 
> >   The difference between :lang(C) and the '|=' operator is that the 
> > '|='
> >   operator only performs a comparison against a given 
> attribute on the
> >   element, while the :lang(C) pseudo-class uses the UA's 
> knowledge of 
> > the
> >   document's semantics to perform the comparison.
> > 
> >   In this HTML example, only the BODY matches [lang|=fr] 
> (because it 
> > has a
> >   LANG attribute) but both the BODY and the P match 
> :lang(fr) (because
> >   both are in French).
> > 
> >   <body lang=fr>
> >     <p>Je suis fran&ccedil;ais.</p>
> >   </body>
> > 
> Hi Ian,
> 
> I think there's still a small lack of clarity for the unaware 
> since saying that BODY matches may infer (incorrectly) for 
> some that <p> inherits. How about this:
> 
> =====
> In this HTML example, the P does not match [lang|=fr] 
> (because only BODY has a LANG attribute) but both the BODY 
> and the P match :lang(fr).
>  
> <body lang="fr">
>    <p>Je suis fran├žais.</p>
>    </body>
> ======
> 
> (Note that I also added quotes around the attribute value, 
> and replaced the entity with a c-cedilla character.)
> 
> RI



Or, on reflection, even better (ie. simpler but equally good explanation):

=====
In this HTML example, the P does not match p[lang|=fr] (because only BODY has a LANG attribute) but the P does match p:lang(fr).
  
<body lang="fr">
   <p>Je suis fran├žais.</p>
   </body>
======

 RI
Received on Tuesday, 14 March 2006 13:03:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 1 October 2008 10:18:50 GMT