W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2006

ISSUE: Malformed literals and non-lexical literals

From: Bijan Parsia <bparsia@cs.man.ac.uk>
Date: Wed, 16 Aug 2006 17:52:45 +0100
Message-Id: <D44F3308-E04A-4D32-A4DA-C21A65883D30@cs.man.ac.uk>
To: RDF Data Access Working Group <public-rdf-dawg@w3.org>

I'm breaking this issue out and consolidating it.

Under RDF, RDFS, and the D variants interpretations, some things  
which are spelled like literals do not denote literals, and  
somethings which are not spelled like literals do denote literals.

Beside each line I indicate the semantics under which the condition  
holds using the following key: RDF for at least RDF interpretations,  
RDFS for at least RDFS, *(D) for at least under (* +  D-entailment),  
and obviously, the datatypes have to be part of the datatype theory.

Literals:
	:x where	
		x rdf:type rdf:XMLLiteral. (RDF)
	_:b where
		 _:b rdf:type rdf:XMLLiteral (RDF, but _:b doesn't stand for a  
particular literal)
	:x where
		:x rdf:type rdfs:Literal (RDFS)
	:x where
		:x :p :y. :p rdfs:domain rdfs:Literal (or rdf:Literal) (symmetric  
with range) (RDFS)
	:x where
		x rdf:type xsd:integer (RDF(D))

The rest should be obvious. I may have missed some.

Non-literals:
	"<"^^rdf:XMLLiteral (RDF)
	"a"^^rdf:integer (RDF(D))
	"-5"^^rdf:positiveInteger (RDF(D))
(there are range and domain things analogous to the RDFS ones)

(The latter are non-literals because they are illformed. Illformed  
literals denote a non-literal element of the domain.)

<http://www.w3.org/TR/rdf-mt/#RDFINTERP>
""" The third condition requires that ill-typed XML literals denote  
something other than a literal value: this will be the standard way  
of handling ill-formed typed literals."""

If I understand the current intention of the current document,  
isLiteral returns false for all the above literals and true for all  
the above non-literals, even under datatype semantics (which is the  
only other semantics mentioned in the document).

I find that counterintuitive at the very least. Perhaps we could wave  
away the literals above by constraining isLiteral to only the lexical  
form, but under RDF semantics "<"^^rdf:XMLLiteral *is not a literal*.  
(Is simple + datatype a possible combination? In which case all the  
RDF weird literals/non-literals will also be in Simple(D)).

I'll also note that:
	"-5"^^rdf:positiveInteger < "5"^^rdf:positiveInteger

should be an error, not false (I think). This goes with the weird case:
	:x rdf:type xsd:positiveInteger.
	:y rdf:type xsd:negativeInteger.

Let ?x/:x and ?y/y:
	what does ?x > ?y evaluates to? Even if we think that isLiteral is a  
special case, it's hard to see that the comparisons should be (as I  
said before). Especially as some of them are detectable for the  
lexical form of the binding.

Cheers,
Bijan.
Received on Wednesday, 16 August 2006 16:53:18 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:27 GMT