Re: CSS2.1 :lang

The language code is also defined earlier. If the matching algorithm has no
dependencies on the values of the language and country etc codes, then by
defining it independently of the RFC, we don't need to keep revising this
section when the  content of the language code is revised. For example, if it
is revised to include script in the name.

It makes the specification more precise as well, as referencing these other
documents leaves it to the imagination as to what the correct behavior is when
presented invalid values, etc.

The baby is much safer if it is not left in the bathtub at all.

Richard Ishida wrote:
> > > For the purposes of matching, I wonder if it makes sense to
> > reference
> > > the RFCs at all. Isn't it really string matching based on strings
> > > formatted with hyphen separators? Does any software verify that the
> > > language tag contains appropriately registered codes or uses ISO
> > > codes? Should it be an error, or perhaps the rule ignored, if a CSS
> > > document specifies  :lang(k9) since k9 is not an offical
> > language code
> > > or a properly formatted private code.
> >
> > I like that suggestion: it removes a dependency.
> >
> > The definition of the "|=" operator is already generic. It
> > only requires a UA to split a string value at every "-" and
> > doesn't require the string to be a valid language. The
> > ':lang()' refers to that definition and could be made generic
> > as well, e.g.:
> >
> > Current text in 5.11.4:
> >
> >     The pseudo-class ':lang(C)' matches if the element is in language
> >     C. Here C is a language code as specified in HTML 4.0 [HTML40] and
> >     RFC 1766 [RFC1766]. It is matched the same way as for the '|='
> >     operator.
> >
> > Proposed:
> >
> >     The pseudo-class ':lang(C)' matches if the element is in language
> >     C. CSS doesn't define what are valid language names and the string
> >     C doesn't have to be a valid language name in the source document.
> >     It is matched the same way as for the '|=' operator.
> I disagree with this proposed para.  I think you are throwing out the
> baby with the bath water.
> I see the value of referring to RFC3066 is to ensure maximum
> standardisation/interoperability in the way language codes are used.
> For example, 3066 requires the use of 2-letter codes rather than
> 3-letter codes wherever they exist.  This is important advice for
> interoperability. 3066 also says that you should use ISO codes rather
> than some arbitrary label where it exists. Etc.
> I think the original text was defining how one should label languages in
> CSS, not just how the matching should work.  And I think it is important
> to retain the former, though the text could certainly be reworded so as
> to separate the two ideas, remove the HTML reference and refer to
> RFC3066.
> RI

Tex Texin   cell: +1 781 789 1898
Xen Master                
Making e-Business Work Around the World

Received on Thursday, 16 October 2003 20:00:11 UTC