W3C home > Mailing lists > Public > public-multilingualweb-lt@w3.org > January 2013

Re: question on issue-110 (xml:lang vs. lang)

From: Leroy Finn <finnle@tcd.ie>
Date: Tue, 29 Jan 2013 10:09:46 +0000
Message-ID: <CAMYWBwu784Q_TyGmf6eXuafJLx+HVtdoYNYEuKHcSmgRRm9=ew@mail.gmail.com>
To: Arle Lommel <arle.lommel@dfki.de>
Cc: Yves Savourel <ysavourel@enlaso.com>, "<public-multilingualweb-lt@w3.org>" <public-multilingualweb-lt@w3.org>
Okay I will add this test file today based on this discussion.

Leroy


On 28 January 2013 21:32, Arle Lommel <arle.lommel@dfki.de> wrote:

> Anything else would be tremendously unintuitive for most users and would
> create strange problems. So +1 to Yves and Shaun.
>
> Arle
>
> --
> *Arle Lommel*
> Berlin, Germany
> Skype: arle_lommel
> Phone (US): +1 707 709 8650
>
> *Sent from a mobile device. Please excuse any typos.*
>
> On Jan 28, 2013, at 21:21, Yves Savourel <ysavourel@enlaso.com> wrote:
>
> +1 on Shaun's comments.
> (especially "...xml:lang to take precedence over lang only when defined on
> the same node")
>
> -ys
>
>
> -----Original Message-----
> From: Shaun McCance [mailto:shaunm@gnome.org <shaunm@gnome.org>]
> Sent: Monday, January 28, 2013 12:28 PM
> To: Felix Sasaki
> Cc: Jirka Kosek; public-multilingualweb-lt@w3.org
> Subject: Re: question on issue-110 (xml:lang vs. lang)
>
> On Fri, 2013-01-25 at 12:17 +0100, Felix Sasaki wrote:
>
> Am 25.01.13 11:19, schrieb Jirka Kosek:
>
> On 25.1.2013 9:01, Felix Sasaki wrote:
>
>
> we had discussed on Wednesday
>
> http://www.w3.org/2013/01/23-mlw-lt-irc#T11-36-22
>
> that xml:lang and lang take precedence over the BCP 47 value
>
> conveyed by a "langRule". One clarification question: should we
>
> state that this relation also includes inherited values? e.g.
>
>
> <html xml:lang="en" ...>...
>
> <its:langRule selector="//h:p" langPointer="@class"> ...
>
> <body lang="ja"> ...
>
> <p class="de">...
>
> </html>
>
>
> In this case the output of processing "langRule" would convey "en":
>
> xml:lang takes precedence over HTML lang. And xml:lang inherits to "p".
>
> My instinct says that inheritence shouldn't be applied here and for
>
> p element language should be selected using langRule.
>
>
> Fine by me - so the output in the test suite would be
>
>
> /html    lang="en"
>
> ...
>
> /html/body[1]    lang="ja"
>
> /html/body[1]/p[1]    lang="de"
>
>
> Now, if "p" contains a "span" element, what would the language be?
>
> Probably
>
>
> /html/body[1]/p[1]/span[1]    lang="de"
>
>
> I would say certainly lang="de". I would also expect xml:lang to take
> precedence over lang only when defined on the same node, so I would expect
> the language to be "ja" on body.
>
> getLang(node):
>  if node/@xml:lang: return node/@xml:lang
>  if node/@lang: return node/@lang
>  if node selected by a langRule: return value from rule
>  if node.parent: return getLang(node.parent)
>  else: return ""
>
> Seems to me that's the same algorithm we use for all other data
> categories, except we don't define our own local attribute, using xml:lang
> and lang instead.
>
> --
> Shaun
>
>
>
>
>
>
Received on Tuesday, 29 January 2013 10:10:13 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:08:26 UTC