W3C home > Mailing lists > Public > public-qa-dev@w3.org > March 2008

Re: Testing RFC 4646 values in markup languages

From: Karl Dubost <karl@w3.org>
Date: Tue, 18 Mar 2008 11:00:52 +0900
Cc: Olivier Théreaux <ot@w3.org>, "public-qa-dev@w3.org list" <public-qa-dev@w3.org>
Message-Id: <25891107-C235-4C9C-B6D0-88F2C61F32BC@w3.org>
To: Felix Sasaki <fsasaki@w3.org>

Le 17 mars 2008 à 17:52, Felix Sasaki a écrit :
>> In XML, it is a bit tricky, it seems. By XML spec
> why is it tricky?

mwarf. sent it too quick.

In Extensible Markup Language (XML) 1.0 (Fourth Edition), I read about  
[language identification][2],

	"A special attribute named xml:lang may be
	inserted in documents to specify the language
	used in the contents and attribute values of
	any element in an XML document. In valid
	documents, this attribute, like any other,
	MUST be declared if it is used."

Initially I thought that any vocabulary could have xml:lang anywhere  
but the rule seems to be a bit more refined.

1. It can be on any elements.
2. For documents meant to be validated, it MUST be declared (schemas,  

I see later on in Attribute-list declaration:

	"At user option, an XML processor MAY issue
	a warning if attributes are declared for an
	element type not itself declared, but this
	is not an error. The Name in the AttDef rule
	is the name of the attribute."

in HTML 5 spec the xml:lang is [defined][4] by 3.4.3. The lang (HTML  
only) and xml:lang (XML only) attributes

	"The xml:lang  attribute is defined in XML. [XML]"

It is part of the global attributes definition

	"The following attributes are common to and may
	be specified on all HTML elements (even those
	not defined in this specification):"

which is not following what HTML 4.01 was doing before.

	lang     on All elements but APPLET, BASE,

html5 served as application/xhtml+xml

<html xmlns="http://www.w3.org/1999/xhtml">
  <head> <title>example of xhtml</title> </head>
	<p>foo <br xml:lang="en"/> bar</p>

What a Conformance checker should do here?

[1]: http://www.w3.org/TR/2006/REC-xml-20060816/
[2]: http://www.w3.org/TR/2006/REC-xml-20060816/#sec-lang-tag
[3]: http://www.w3.org/TR/2006/REC-xml-20060816/#dt-attdecl
[4]: http://www.w3.org/TR/html5/#the-lang

Karl Dubost - W3C
Be Strict To Be Cool
Received on Tuesday, 18 March 2008 02:01:29 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:36:27 UTC