Why is xml:lang not allowed on typed literals?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Why is xml:lang not allowed on typed literals?

Bernard Vatant
Hi all

This list does not seem very active, but hopefully someone is still monitoring it and will be able to answer

In http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-Literal I read

Plain literals have a lexical form and optionally a language tag as defined by [RFC-3066], normalized to lowercase.

Typed literals have a lexical form and a datatype URI being an RDF URI reference.

Between the lines I read that the language tag xml:lang is not allowed on typed literals. Actually I just tried to do this. The rationale is to define a datatype "One Sentence" which must contain a single sentence, starting with a upper-case, ending with a dot etc ... and using this datatype for a "tagLine" property - which of course has also a language.

So I tried the syntax below and proposed it to various tools

- W3C validator validates it, seems to ignore the xml:lang tag

- Protégé does the same, imports the file and ignores the xml:lang tag when saving

- SWOOP does the other way round, ignores the rdf:datatype but keeps the language tag.

My question is, just out of curiosity, what is the rationale behind not allowing xml:lang on typed literals?

Thanks for any clue

Bernard

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:voc="http://example.org/voc#">
   
            <rdf:Description rdf:about="http://products.example.org/widgets/EBSW">
                <rdfs:label xml:lang="en">Example Best Super Widget</rdfs:label>
                <voc:tagLine xml:lang="fr" rdf:datatype="http://example.org/datatype#OneSentence">Notre meilleur widget est le plus beau et le moins cher du monde.</voc:tagLine>
            </rdf:Description>
   
</rdf:RDF>

--
Bernard Vatant
Senior Consultant
Vocabulary & Data Engineering
Tel:       +33 (0) 971 488 459
Mail:     [hidden email]
----------------------------------------------------
Mondeca
3, cité Nollez 75018 Paris France
Web:    http://www.mondeca.com
Blog:    http://mondeca.wordpress.com
----------------------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: Why is xml:lang not allowed on typed literals?

jan.grant
On Thu, 15 Oct 2009, Bernard Vatant wrote:

> Hi all
>
> This list does not seem very active, but hopefully someone is still
> monitoring it and will be able to answer
>
> In
> http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-Literal I
> read
>
> Plain literals have a lexical
> form<http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#dfn-lexical-form>and
> optionally a language
> tag as defined by
> [RFC-3066<http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#ref-rfc-3066>],
> normalized to lowercase.
>
> Typed literals have a lexical
> form<http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#dfn-lexical-form>and
> a datatype
> URI being an RDF URI
> reference<http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#dfn-URI-reference>
> .
>
> Between the lines I read that the language tag xml:lang is not allowed on
> typed literals. Actually I just tried to do this. The rationale is to define
> a datatype "One Sentence" which must contain a single sentence, starting
> with a upper-case, ending with a dot etc ... and using this datatype for a
> "tagLine" property - which of course has also a language.
>
> So I tried the syntax below and proposed it to various tools
>
> - W3C validator validates it, seems to ignore the xml:lang tag
>
> - Prot?g? does the same, imports the file and ignores the xml:lang tag when
> saving
>
> - SWOOP does the other way round, ignores the rdf:datatype but keeps the
> language tag.
>
> My question is, just out of curiosity, what is the rationale behind not
> allowing xml:lang on typed literals?
>
> Thanks for any clue

I believe the rationale was along the lines that if the value of a typed
literal was represented by an XML construction, the xml:lang belonged _in_
the representation, not _on_ it. That is, that if a literal's values are
represented in infoset terms, the xlm:lang belongs in the representation.


--
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Usenet: The separation of content AND presentation - simultaneously.