W3C home > Mailing lists > Public > www-validator@w3.org > October 2004

Re: Validating in forein language (Modified by olivier Thereaux)

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Wed, 6 Oct 2004 00:32:06 +0300 (EEST)
To: allan smith <webmanager@telfordsteamrailway.co.uk>
Cc: validator <www-validator@w3.org>
Message-ID: <Pine.GSO.4.58.0410060021090.7082@korppi.cs.tut.fi>

On Tue, 5 Oct 2004, allan smith wrote:

> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//IT"

That's incorrect, it must have //EN not //IT. The two letters _are_ a
language code, but they indicate the language used in the prose of the
Document Type Definition (mainly comments), and this is English.
It has nothing to do with the document's language.

> <html lang="en" xml:lang="it" xmlns="http://www.w3.org/1999/xhtml">

That's valid but incorrect. It gives conflicting information about
language: the first attribute says it's English, and the second one says
it's Italian. This is incorrect even if the document is bilingual (in
which case you should just specify one language here and the other
locally, for the applicable elements). Actually I think there's no
normative definition that says which attribute "wins" in a conflict
situation. According to http://www.w3.org/TR/html/#C_7 the xml:lang
attribute "wins", but that's in the (in)famous Appendix C, which is
specifically described as informative, not normative.

>   <title xml:lang="it">Ferrovia Del Vapore Di Telford - Home
> Page</title>

That's OK, but you don't really need the xml:lang attribute, since
language information is by default inherited from the parent element.
Unfortunately there is no way to indicate that the text "Home Page" is
actually in English. The content model of <title> allows character data
only, no tags, and without tags you cannot assign an attribute to a part
of an element's content.

Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Tuesday, 5 October 2004 21:32:40 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:43 UTC