W3C home > Mailing lists > Public > semantic-web@w3.org > February 2010

Re: RDF/XML Syntax Question: Label on an RDF Object being a literal

From: Damian Steer <pldms@mac.com>
Date: Sun, 28 Feb 2010 22:19:27 +0000
Cc: Semantic Web <semantic-web@w3.org>, Dan Brickley <danbrickley@gmail.com>
Message-id: <90888817-4DFC-4C3E-AC4D-0028E8CF5A49@mac.com>
To: Svante Schubert <Svante.Schubert@Sun.COM>

On 28 Feb 2010, at 18:04, Svante Schubert wrote:

> I got a question on RDF/XML syntax.
> I would like to put an rdfs:label on an RDF object being a literal.
> In RDF I read that rdfs:label takes as input an rdfs:Resource
> http://www.w3.org/TR/rdf-schema/#ch_label
> and found that the literal (rdfs:Literal ) is a subclass an rdfs:Resource
> http://www.w3.org/TR/rdf-schema/#ch_literal
> Therefore it should be possible to do so.

Hi Svante,

This is a rather tricky question, but I think the simplest answer is: you can't do that. A literal can't be an object

( The more accurate answer is that a literal can be an object, but you can't write that directly in rdf syntax. For example:

  _:date owl:sameAs "1980-09-02"^^xsd:date . _:date ex:readableLabel "2. September 1980" )

> Why do I like to do it? Imagine I got in ODF a table
> <table:table-cell office:value-type="date" office:date-value="1980-09-02">
> <text:p>2. September 1980</text:p>
> </table:table-cell>

You could use rdf:value:

  _:date rdf:value "1980-09-02" ; ex:readableValue "2. September 1980" .

You might want to add in a type, to indicate that _:date is a date:

  _:date a ex:DateValue ; rdf:value "1980-09-02" ; ex:readableValue "2. September 1980" .

> Similar I desire an adequate solution for RDFa, where

office:value-type="date" office:date-value="1980-09-02">
<text:p xhtml:property="ex:readableValue">2. September 1980</text:p>

This would produce the rdf above.

Hope this helps. I'm sure there are better alternatives.

Received on Sunday, 28 February 2010 22:20:05 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 08:45:16 UTC