Re: XMLLiterals and language

Jeremy Carroll wrote:

> ...
>
>>
>> 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
>>
>>
>
> If your wanting to make such semantically heavy use of language I 
> think it should be a more explicit part of your knowledge base, rather 
> than part of the values of the knowledge base ... moving to triples 
> (I'll recode in RDF/XML at end of message)
>
> _:a rdf:type ex:MessageBundle .
> _:a ex:defaultAbnormalTermination _:b .
> _:b rdf:type ex:Message .
> _:b rdfs:label
> "<span xmlns=\"...xhtml" xml:lang=\"la\">Requiem in pax</span>"
>    ^^rdf:XMLLiteral.
> _:a ex:abnormalTermination _:c .
> _:c rdf:type ex:Message .
> _:c dc:language "en" .
> _:c rdfs:label
> "<blink xmlns=\"...xhtml" xml:lang=\"en\">Rest in peace</blink>"
>    ^^rdf:XMLLiteral.
>
>
> Notes:
> + <blink> isn't an HTML element, so is a further issue here.
> + I've added a type ex:Message because I think it makes it clearer, a 
> Message has a label, and may have a language
> + I've added a property defaultAbnormalTermination rather than relying 
> on some procedure to identify the default over all possible 
> abnormalTerminations
>
> In RDF/XML
>
> <ex:MessageBundle>
>    <ex:defaultAbnormalTermination>
>       <ex:Message>
>          <rdfs:label rdf:parseType="Literal"><span
> xml:lang="la">Requiem in pax</span></rdfs:label>
>       </ex:Message>
>    </ex:defaultAbnormalTermination>
>    <ex:abnormalTermination>
>       <ex:Message>
>          <dc:language>en</dc:language>
>          <rdfs:label rdf:parseType="Literal"
> ><blink xmllang="en">Rest in peace</blink></rdfs:label>
>        </ex:Message>
>     </ex:abnormalTermination>
> </ex:MessageBundle>

I think it is generally possible to model language-information without 
xml:lang, personally I'd probably have renounced on promoting this 
xml-heritage to rdf in favour of a general practice like in your example 
(possibly using rdf:value instead of rdfs:label and - if legal - 
rdfs:Literal instead of ex:Message). In practice there are often 
situation where a literal may be plain as well as contain XHTML, real 
world usage of RSS shows that even properties designed to have a 
plain-literal value are often used containing encoded XHTML. The widely 
used RSS mod:content [1] mandates the encoding of XHTML in a plain 
literal but it would probably be easy for parsers and producers to 
switch to parseType="Literal". In contrast changing the range of the 
property from Literal to something like "ex:MessageWithPossibleLanguage" 
is likely to be far too complicated to be adopted.

reto

1. http://web.resource.org/rss/1.0/modules/content/

Received on Tuesday, 18 January 2005 12:24:59 UTC