Re: @lang and @xml:lang in XHTML+RDFa 1.1

Hi Toby, thanks for reply.

2010/1/13 Toby Inkster <tai@g5n.co.uk>:
>> <html lang="ja" xml:lang="ja">
>> ...
>> <p xmlns:dc="http://purl.org/dc/terms/">
>> Updated: <span property="dc:modified">2010-01-13</span>...
>> </p>
>>
>> which generates weird triple:
>>
>> <> dc:modified "2010-01-13"@ja .
>
> It is a weird triple, but the XHTML itself is at fault -- the RDF
> generated suffers as a consequence.

> Note that the word "Updated", which is an English, but not as far as I
> know, a Japanese word, is tagged as being in Japanese too and will be
> interpreted as such by all implementations of the xml:lang attribute --
> not just RDFa processors.

Sorry, that's the consequence of my changing example to 'Updated' from
Japanese equivalent for non-Japanese readers. Even though I changed
lang/xml:lang to "en", we have the same problem: "2010-01-13"@en is
not an intended result.


> This is an annoyance of language tagging in XHTML generally, and I don't
> think it's RDFa's job to fix it. RDFa should simply use XHTML's built-in
> mechanism for declaring languages (mo matter how annoying it may be to use
> correctly) rather that trying to invent its own rules.


I agree with you in some points, but language tagging in XHTML is
primarily for assistive technologies, not for precise data annotation.
There is no big problem for screen readers when <span> element with
date string has language information, but it matters for RDFa
processors.

(I know simply ignoring lang attribute is not a very good solution, though...)



> 1. "mul" is the code for "multiple languages". This would generate a
> literal tagged with language @mul as you'd expect, however it would be
> treated as the same as xml:lang="" in terms of inheroting the language to
> descendent elements. Example:
>
>  <div xml:lang="mul" property="ex:test1" content="Foo">
>    <span property="ex:test2">Bar</span>
>    <span property="ex:test3" xml:lang="en">Baz</span>
>  </div>
>
> would generate:
>
>  <> ex:test1 "Foo"@mul .
>  <> ex:test2 "Bar" .
>  <> ex:test3 "Baz"@en .
>
> This would allow authors to markup the fact that an area of the page
> contains multiple languages, and that RDFa processors should not try to
> interpret the language of descendent elements without further prompts.
>
> 2. "zxx" is the code for non-linguistic content. Processors could
> recognise xml:lang="zxx" as being equivalent to xml:lang="".

Unfortunately, those do not help assistive techs..

Thanks for discussion.

-- 
@prefix : <http://www.kanzaki.com/ns/sig#> . <> :from [:name
"KANZAKI Masahide"; :nick "masaka"; :email "mkanzaki@gmail.com"].

Received on Wednesday, 13 January 2010 15:03:06 UTC