Re: XMLLiterals and language

Jeremy Carroll wrote:

>
> Reto Bachmann-Gmuer wrote:
>
>> Jeremy Carroll wrote:
>>
>>> According to the recs the language in this one is ignored. If you 
>>> want the language tag (which you should) you have to put it 
>>> explicitly inside the XMLLiteral e.g.
>>>
>>>
>>> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>>>   xmlns="....xhtml"
>>>   xmlns:dc="http://purl.org/dc/elements/1.1/">
>>>   <rdf:Description rdf:about="http://www.w3.org/">
>>>     <dc:title  rdf:parseType="Literal" xml:lang="en"><span
>>> xml:lang="en">World Wide Web
>>>  Consortium</span></dc:title>
>>>   </rdf:Description>
>>>  </rdf:RDF>
>>
>>
>>
>> After finding the current recs, I think I understood but don't like it.
>>
>> My usecase is an application (KnoBot [1]) delivering rdf on http 
>> requests, it honours the accept-language header on a per literal 
>> basis, literals in a language that is not in the accept-language 
>> header are not ignored, the others are sorted according to the user 
>> preferences. Now I don't like the idea to xml-parse every literal.
>>
>> Then I would have assumed a semantic difference between the language 
>> of the literal, and the language of the elements in the xhtml.
>>
>> <ex:Book>
>>    <dc:title xml:lang="de">Carpe diem</dc:title>
>> </ex:Book>
>>
>> I would have thought that this means that the title of the German 
>> (translation of a) book is "Carpe diem". Similarly to quotes in 
>> foreign language within a document, if xml:lang would be legal with 
>> XMLLiterals I would have understood the following to express that 
>> "Carpe diem" are Latin words expressing the German title of the book.
>>
>> <ex:Book>
>>    <dc:title xml:lang="de" rdf:parseType="Literal"><span
>> xml:lang="la">Carpe diem</span></dc:title>
>> </ex:Book>
>>
>>
>
> I suggest the following markup for that example:
> <ex:Book>
>     <dc:title rdf:parseType="Literal"><span xml:lang="de"><span
>  xml:lang="la">Carpe diem</span></span></dc:title>
> </ex:Book>
>
>
> but I'm not wholly up on the conventions for using lang tags to 
> indicate one language quote inside another ... (cc-ing to 
> www-international for a further opinion).
> I think if you want to know about the language of a piece of XHTML you 
> have to process it as XHTML, hmmmm, I suppose for an XHTML page there 
> is often metadata about the page such as the accept-language headers 
> which give some sort of overview.

With this convention it becomes effectively impossible to have a 
language independent default version. With the following illegal rdf/xml 
I'd like to express that the default abnormal-termination message if 
"Requiem in pax" which are Latin words, but the English version is a 
blinking "Rest in peace".

<ex:MessageBundle>
    <ex:abnormalTermination rdf:parseType="Literal"><span
         xml:lang="la">Requiem in pax</span></ex:abnormalTermination>
    <ex:abnormalTermination xml:lang="en" 
rdf:parseType="Literal"><blink>Rest in 
peace</blink></ex:abnormalTermination>
 </ex:MessageBundle>

reto

Received on Tuesday, 18 January 2005 11:27:36 UTC