HTML5 test cases and the lang attributes

This may be a specification error, but in the HTML5+RDFa document, not in the CR-to-be documents:-)

Tests #12 tests the language setting (the same issue is also valid for tests #13 and #172):

<!DOCTYPE html>
<html 
prefix="ex: http://example.org/">
  <head about="">
	<title>Test 0012</title>
  	<meta about="http://example.org/node" property="ex:property" xml:lang="fr" content="chat" />
  </head>
  <body>
  	<p></p>
  </body>
</html>

expecting

ASK WHERE {
	<http://example.org/node> <http://example.org/property> "chat"@fr .
}

The HTML5+RDFa document says:

"The current language can be set using either the @lang or @xml:lang attributes."

However, the HTML5 document says:

[[[
Authors must not use the lang attribute in the XML namespace on HTML elements in HTML documents. To ease migration to and from XHTML, authors may specify an attribute in no namespace with no prefix and with the literal localname "xml:lang" on HTML elements in HTML documents, but such attributes must only be specified if a lang attribute in no namespace is also specified, and both attributes must have the same value when compared in an ASCII case-insensitive manner.
]]]

What this tells me is:

- the test is actually wrong, because using xml:lang alone should not be used
- I wonder whether the HTML5+RDFa is correct; it could be understood as if xml:lang alone is acceptable. I think it would be better to refer to the HTML5 definition on how to set the language

(Of course, an RDFa processor may be lax. I have now accepted a single xml:lang, although I will issue a processor warning.)

----
Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Friday, 9 March 2012 15:43:25 UTC