RE: Can we have @lang back in XHTML Family?

I'm copying in the i18n WG to this thread.

I18n folks:  See the following thread, where Dom proposes the introduction
of the lang attribute to XHTML in addition to xml:lang, so that when people
serve XHTML as text/html the language information is available.

http://lists.w3.org/Archives/Public/public-xhtml2/2009Jan/0049.html

I was sure I had written something along these lines and sent to the html5
WG, but I don't seem to be able to find it.  We certainly had some
discussion of it in the i18n WG a while back.

I hear many complaints from authors using XHTML about having to declare
language twice, once with lang and once with xml:lang for XHTML 1.0, and I
must say that I also find it burdensome myself.  I encourage people to
persevere because agents that process text/html don't recognise xml:lang,
but agents that process the file as XML (eg. using XSLT) only recognise
xml:lang.

I would very much like to reach a situation where an author could just use
one or other of these attributes, and achieve the desired result.

I was originally thinking, however, that we should ask the HTML5 people to
write their spec such that future processors of text/html would recognise
both lang and xml:lang as equivalent.  That way it wouldn't be necessary for
the XHTML specs to change, and authors of XHTML would be able to use just
xml:lang, rather than both attributes.

The idea that it might be possible to introduce lang to XHTML 1.1 etc was
interesting, but I think that the problem would be that, if people don't
continue to use both attributes, xml processors would have to also be
changed to recognise that lang is equivalent to xml:lang (eg. so that the
XPath lang() function would still work in XSLT or XQuery).  In fact, I think
that that would ultimately mean changing the XML spec, and the
Canonicalisation spec, XML Schema, etc.  I think that many people would only
use lang when writing XHTML, and then we'd have the opposite problem from
the one we're trying to fix, ie. that XHTML doesn't work as it should as
XML.

I can't say what level of acceptance the idea would have with the HTML5
folks, but it seems to me that moving text/html processors to accept
xml:lang as equivalent to lang would be more effective, and perhaps easier.

Ok, so what am I missing?

RI




============
Richard Ishida
Internationalization Lead
W3C (World Wide Web Consortium)

http://www.w3.org/International/
http://rishida.net/



> -----Original Message-----
> From: Dominique Hazael-Massieux [mailto:dom@w3.org]
> Sent: 21 January 2009 08:24
> To: public-xhtml2@w3.org
> Cc: ishida@w3.org; fd@w3.org
> Subject: Can we have @lang back in XHTML Family?
> 
> Hi,
> 
> The to-be-published version of the XHTML Media Types note allows for any
> XHTML Family document to be served as text/html:
>   http://www.w3.org/MarkUp/2009/ED-xhtml-media-types-20090116/
> 
> But as was discussed in this very list [1], this is problematic since
> the lang attribute (the only one interpreted as a language annotation on
> documents served as text/html) is not allowed by the XHTML DTDs (but the
> XHTML 1.0 one).
> 
> Could the lang attribute be added to the relevant DTDs so as to enable
> properly lang-marked up XHTML documents to be served as text/html?
> 
> FWIW, I'm fairly confident I could get formal support from the Mobile
> Web Best Practices Working Group on this proposal if this is of any
> help, since this impacts negatively on the deployment of their mobileOK
> specification.
> 
> Thanks,
> 
> Dom
> 
> 1. http://lists.w3.org/Archives/Public/public-xhtml2/2008Mar/0086.html

Received on Friday, 23 January 2009 20:33:10 UTC