W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2006

[whatwg] Map lang to xml:lang at the parser level

From: Simon Pieters <zcorpan@hotmail.com>
Date: Sun, 15 Oct 2006 17:05:47 +0000
Message-ID: <BAY109-F31FD083C506B5D3DED3DD9B4080@phx.gbl>
Hi,

When parsing HTML and serializing as XML you normally want to change the 
lang attribute to xml:lang. But why not put it in the XML namespace at the 
parser level? Then when you serialize the DOM as XML it becomes xml:lang 
automatically.

The .lang DOM attribute would reflect xml:lang. This would make it simpler 
to set/get the language with script in XHTML (no need to use namespace-aware 
methods).

I don't know if this is too expensive on the parser or if there are other 
flaws but it's just an idea.

Regards,
Simon Pieters
Received on Sunday, 15 October 2006 10:05:47 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:48 UTC