[Bug 16166] i18n-ISSUE-138: Make lang and xml:lang synonyms in HTML5

https://www.w3.org/Bugs/Public/show_bug.cgi?id=16166

--- Comment #8 from Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no> 2012-03-25 03:01:09 UTC ---
(In reply to comment #7)
> (In reply to comment #5)

> It's because I often want to process the pages as XML data (pages that in other
> contexts are just served to a browser) that I use XHTML 1.0 (and want to use
> Polyglot in future) for my pages.

xml:lang is not a requiremnt in XHTML 1.0 - that's your own choice. However,
many tninks that it is required.  Polyglot currently recommends to use both
xml:lang and lang, while your goal seems to be to be able to *only* use
xml:lang.

> So, for example, XPath has a lang() function that
> tests whether the language of a given node, *as defined by the xml:lang
> attribute*, corresponds to the language supplied as an argument.  This function
> does not work on a lang attribute in the data being read.

Outside my competence, but would it be possible to convert @lang to @xml:lang
and back again, as a part of your working progress? It doesn't sound like a
particulary complicated thing ...

> So, basically, any time I write source code for a browser that i may want to
> parse also using an XML processor, I need to use the xml:lang attribute as well
> as the lang attribute.  (If you aren't going to process polyglot documents as
> XML, I'm not sure why you'd want to go to the trouble of making them polyglot.)

There can be more than one motivation for using polyglot markup. 

> In my view, xml:lang is therefore not optional for polyglot documents if you
> want to process the same data using a 'generic' XML processor and want to
> detect language information.

You prefer to make @lang optional instead of making @xml:lang optional ...  I
agree that the more generic the XML parser, the more is xml:lang required - and
not optional. 

But your motivation for this bug, was simplicity: You want to be able to create
polyglot as well as non-polyglot HTMl with xml:lang, out without @lang. 

In that regard, then it ought to be worth spreading the news to the many that
don't use a tool chain like yours but nevertheless produces polyglot markup -
with both language attributes, that - hey, xml:lang is valid, but actually not
required to be valid and often not necessary.

In fact, we could solve *this* bug by somehow making the tools you and other
use, handle @lang.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You reported the bug.

Received on Sunday, 25 March 2012 03:01:15 UTC