W3C home > Mailing lists > Public > www-rdf-interest@w3.org > October 2004

Smart Literal proposal

From: Stephane Fellah <fellah@pcigeomatics.com>
Date: Fri, 22 Oct 2004 16:23:11 -0400
Message-ID: <8ED21571324EB145933ACCD22B86AC367888F2@bach.ncr.pcigeomatics.com>
To: <jena-dev@yahoogroups.com>, <www-rdf-interest@w3.org>
Cc: "Alamusi Alamusi" <alamusi@pcigeomatics.com>, "Steven Keens" <keens@pcigeomatics.com>, "Weisheng Li" <weisheng@pcigeomatics.com>


I am trying currently to qualified literal with more attributes than
xml:lang and rdf:datatype. 


In RDF, there are two three types of literal.


* Plain Literal, which consists of a string with an optional attribute

* Typed Literal, which is a string with rdf:datatype attribute.

* XML Literal, which is a literal representing an XML literal.


Sometimes, it is necessary to qualified further a typed Literal without
creating a resource. For example, a unit of measure or a codespace
(taxonomy) in which the value belongs to (tree name taxonomy for
example). The only way to describe these attributes in the current RDF
specification, is to create an anonymous resource having these different
properties. This makes the serialization of RDF in XML pretty lengthy
and ugly to read by human.


Here an example (in a sloppy syntax, I apologize)




        <value rdf:datatype="&xsd;float">10</value>

        <gml:uom rdf:resource="urn:opengis:uom:meter">




<gml:codespace rdf:resource="urn:ataxonomyofsurfacetype"/>




A more elegant way to serialize this would be:



      <length gml:uom="urn:opengis:uom:meter"
rdf:datatype="&xsd;float">10</length >



Please note that this syntax will bridge some gaps with current XML
document syntax defined in XML schema.


The problem with this syntax is that RDF parsers such as ARP or Jena,
would return an error because no other property attribute can be used
with rdf:datatype.


In RDFS, a literal is a subclass of Resource, however most of RDF API
does not use the same hierarchy. In Jena for example, Literal is
subclass of RDFNode and not Resource. So it does not provide the ability
to add additional properties to a literal. However, if we follow the
ontology, I should be able to add either annotation property to Literal
or subclass the class Literal with additional properties (probably would
be in OWL Full in this case). 


If a Literal was a subclass of resource, the former RDF example could be
represented in a canonical way:





           <rdf:datatype rdf:resource="&xsd;float"/> (this is an
extension of rdf)

           <rdf:lexicalform>10</rdf:lexicalform>  (this is an extension
of rdf)

           <gml:uom rdf:resource="urn:opengis:uom:meter"/>





Note that rdf:datatype and rdf:lexicalform does not seem to be defined
in RDFS or RDF, but may be needed to support RDF API.


This form would be equivalent to the previous compact example. The only
constraint we would have to the literal interface is to have properties
with resource URI or string values. May be they should be annotation
properties. Technically, tuning existing a parser to support this
extension would not be a big job. The question is whether this is valid
with RDF semantics or not.

Is there any reason why this could not be done ? Does my reasoning make
sense ? Is the proposal acceptable to improve RDF specification? Does
not anyone experiment such an approach ?


Best regards


Stephane Fellah 

Web Chief Architect

PCI Geomatics, Hull, QC

Received on Friday, 22 October 2004 20:23:45 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:07:53 UTC