W3C home > Mailing lists > Public > public-rdf-wg@w3.org > July 2011

Re: Proposal for ISSUE-12 language-tagged literals

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Sat, 16 Jul 2011 16:52:55 +0100
Message-ID: <4E21B3D7.3020800@epimorphics.com>
To: public-rdf-wg@w3.org
+1
but I have a suggestion as well as to how to make rdf:LangString a datatype.

I'd rather make DATATYPE("foo"@en) be honest and say that it returns 
datatype rdf:LangString.

If we don't want to go down the route of modifying the L2V(d) mapping to 
work on that "foo"@en form (Pat's 'move the quotes out one level') then 
we could use the machinery in the parser process where is is currently.

Define the lexical space of rdf:LangString to be the empty set.  That 
makes it impossible to write a valid rdf:LangString in ^^ form.  Maybe 
someday, some future WG will change this but it will leave current RDF 
valid.

The value space is still <Unicode string, language tag>.

Syntax "foo"@en has it's own mapping from syntax to value.  There's no 
reason why a Turtle parser does not have a rule, for Turtle and related 
syntaxes, that @ is treated in this way.  In RDF/XM, it is the xml:lang 
causing a similar translation from XML syntax.

Turtle parsers already have specific machinery for other datatype.  e.g. 
123 for "123"^^xsd:integer .

	Andy

On 13/07/11 15:51, Richard Cyganiak wrote:
> We have addressed one half of ISSUE-12, the half about string literals *without* language tags.
>
> Here's a proposal for the other half, string literals *with* language tags and rdf:PlainLiteral. This is a very minimalist proposal.
>
> Summary:
> - add classes rdf:LangString and rdf:Text so we can better specify string literals as rdfs:range of properties
> - add the technical term “language-tagged string” as an alternative to the current “plain literal with language tag”
> - ask OWL and RIF WGs to update rdf:PlainLiteral document to reflect the RDF WG decisions
>
> (This completes my ACTION-62.)
>
> Best,
> Richard
>
>
> [[
>
> A literal is either a typed literal or a language-tagged string.
>
> A language-tagged string is an<Unicode string, language tag>  pair.
>
> "Plain literal with language tag" (from RDF 2004) is an alternative term for "language-tagged string". They are the same thing.
>
> rdf:LangString is the class of all language-tagged strings. It can be used in rdfs:range statements.
>
> rdf:Text is the class of all language-tagged strings and all Unicode strings. It can be used in rdfs:range statements.
>
> The RDF Concepts document is updated with the definitions above. No other changes to RDF Concepts.
>
> The RDF Semantics document is updated to make rdf:LangString and rdf:Text work. No other changes to RDF Semantics.
>
> The RDF Schema document is updated to add rdf:LangString and rdf:Text. No other changes to RDF Schema.
>
> The SPARQL WG is asked to *consider* whether DATATYPE("foo"@en) should return rdf:LangString instead of error.
>
> The OWL and RIF WGs are asked to make changes to the rdf:PlainLiteral specification:
>
> - Clarify that the purpose of the document is *solely* to provide
>    compatibility between RDF and specifications whose literal
>    design does not support language tags.
>
> - The spec should be changed to *only* cover strings *with* language
>    tags, because strings without language tags now always have a
>    datatype (xsd:string) and therefore don't need to be covered in this
>    spec.
>
> - Instead of defining its complete own datatype rdf:PlainLiteral,
>    the spec should only extend the rdf:LangString class so that
>    it can serve as a datatype.
>
> ]]
Received on Saturday, 16 July 2011 15:53:26 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:25:44 GMT