- From: Pat Hayes <phayes@ihmc.us>
- Date: Mon, 4 Jan 2010 12:11:04 -0600
- To: Jiří Procházka <ojirio@gmail.com>
- Cc: Dave Reynolds <dave.e.reynolds@googlemail.com>, Semantic Web <semantic-web@w3.org>
On Jan 4, 2010, at 10:32 AM, Jiří Procházka wrote: > I want to be able to express same things in RDF systems which doesn't > support literal types and language tags as in the one which does. That > means simulating those with plain literal using some extra triples > in a > backwards compatible way. Is it even possible? Yes, I think so. But you should not use owl:sameAs. See below. > > From what have you said I think I was talking about literal values all > the time, and I guess literal is general concept of assigning a > value to > a resource, is it? Well, 'literal' is really a syntactic classification: it refers to a particular way of writing a name for something, in effect. Its like saying '345' is a numeral. But when I write the numeral, as in 345 x 2 = 690, I am using the numeral to refer to a number. Just as I can refer to numbers using numerals or not: 345 = three hundred and forty five I can refer to literal values using literals or not. So there isn't anything especially 'literalish' about the literal values: a literal value is just anything denoted by any literal. And the interpretation rules for typed literals are that the value is gotten by applying the datatype mapping to the string, which you can put in a plain literal. So you could translate :foo :baz "string"^^dtype . into something like :foo :baz _:x . _:x :literalForm "string" . _:x :dtMap dtype . using your own properties to refer to the 'parts' of the literal. Of course, RDF doesn't know what these properties mean, but your code can use them to figure out how to translate back and forth, right? >> to* literal values. There is no direct provision in any of these >> languages for talking about literals themselves, any more than the >> use >> of URIs means that you are talking about URIs themselves. >> >> On Jan 4, 2010, at 7:58 AM, Jiří Procházka wrote: >> >>> Hmm I guess you are right >>> (http://www.w3.org/TR/rdf-concepts/#section-Literal-Equality). >> >> That citation refers to syntactic identity of actual literals, not to >> literal values. It is quite possible for two different literals to >> refer >> to the same literal value (and hence to be owl:sameAs one another.) >> For >> example, "abc" and "abc"^^xsd:string. > > Could the same be said about "12" and "12"^^xsd:integer? No, because the plain literal really does refer to itself, it to the bare character string. So "12" isn't the number 12, its the string one- two. > Literal value is just the character sequence, or it also contains the > type information? Literal value is what the literal *means*. So for xsd:numbers, its the actual number; for xsd:date, its the actual date (whatever that is: see XML Schema for that answer) , and for xsd:string its the actual string. This last is a weird case, because for that one, the value *is* the actual syntactic literal. Thats why we say that plain literals denote themselves. So, to illustrate, the literal "12"^^xsd:string refers to the two-character string '12', but "12"^^xsd:number refers to the number twelve. Not to a data structure or a binary representation of that number, but the *actual number*. If you were to use the above re-rendering of it: _:x :literalForm "12" . _:x :dtMap xsd:number . Then "12" refers to the string, and _:x refers to the number. > This is especially hard for me to understand, since I am not a > logician > and I wasn't able to decipher the RDF Semantics document, sorry :) Well, I did my best :-) Pat > > Best, > Jiri > >> >>> I guess some property would have to be created: >>> >>> _:x rdf:type xsd:date . >>> _:x todo:value "2008-01-01" . >>> >>> todo:value rdfs:domain rdfs:Literal . # well, typed literal, no such >>> class exists (yet) >>> todo:value rdfs:range rdfs:Literal . # well, plain literal :) >> >> These would be very odd classes, if (like rdfs:Literal) they are >> classes >> of literal values. Since "anystring"^^xsd:string is the same value as >> "anystring", the plain literal class would be a subclass of the typed >> literal class. (See why its important to not confuse use with >> mention?) >> In fact, it gets worse, since its also quite possible for a blank >> node >> (as you yourself show) or even a URI to denote a literal value. I can >> quite legitimately write >> >> ex:foo owl:sameAs "abc"^^xsd:string . >> >> for example. If you base classes on what syntactic form is used to >> denote something, what class will you put this in? >> >> Pat Hayes >> >>> >>> that should be equivalent to saying: >>> >>> _:x owl:sameAs "2008-01-01"^^xsd:date . >>> >>> Best, >>> Jiri >>> >>> On 01/04/2010 09:28 AM, Dave Reynolds wrote: >>>> Jiří Procházka wrote: >>>>> Sorry for resurrecting this old thread, but I just stumbled upon >>>>> this: >>>>> >>>>> "rdfs:Datatype is both an instance of and a subclass of >>>>> rdfs:Class. >>>>> Each >>>>> instance of rdfs:Datatype is a subclass of rdfs:Literal." >>>>> >>>>> "A typed literal is an instance of a datatype class." >>>>> >>>>> citing http://www.w3.org/TR/rdf-schema/#ch_datatype >>>>> >>>>> So I think this is valid: >>>>> >>>>> _:x rdf:type xsd:date . >>>>> _:x owl:sameAs "2008-01-01" . >>>> >>>> Not as such, did you mean: >>>> >>>> _:x rdf:type xsd:date . >>>> _:x owl:sameAs "2008-01-01"^^xsd:date . >>>> >>>> ? Which would, I believe, be valid. >>>> >>>> Dave >>>> >>>>> >>>>> Quite confusing, but might be useful for RDF systems which treat >>>>> literals as just one "type" (type from their point of view). >>>>> >>>>> Shame there is no such thing for language tags, or is there? >>>>> >>>>> Best, >>>>> Jiri Prochazka >>>>> >>>>> On 07/06/2009 07:43 PM, Jeremy Carroll wrote: >>>>>> Pat Hayes wrote: >>>>>>>>> p a rdf:Property ; >>>>>>>>> rdfs:domain rdfs:Literal ; >>>>>>>>> rdfs:range rdfs:Datatype . >>>>>>> >>>>>>> _:x p xsd:date . >>>>>>> _:x :seenAsLiteral "2008-01-01" . >>>>>> I tend to write these examples as >>>>>> >>>>>> _:x p xsd:date . >>>>>> _:x owl:sameAs "2008-01-01" . >>>>>> >>>>>> Semantically that has a literal as the subject, and it works >>>>>> around >>>>>> the >>>>>> legacy syntactic restriction >>>>>> >>>>>> Unfortunately the reasoning required to make this work means that >>>>>> simple >>>>>> RDF systems may well not get it. >>>>>> >>>>>> Jeremy >>>>>> >>>>>> >>>>>> >>>>> >>>> >>> >> >> ------------------------------------------------------------ >> IHMC (850)434 8903 or (650)494 >> 3973 >> 40 South Alcaniz St. (850)202 4416 office >> Pensacola (850)202 4440 fax >> FL 32502 (850)291 0667 mobile >> phayesAT-SIGNihmc.us http://www.ihmc.us/users/phayes >> >> >> >> >> > ------------------------------------------------------------ IHMC (850)434 8903 or (650)494 3973 40 South Alcaniz St. (850)202 4416 office Pensacola (850)202 4440 fax FL 32502 (850)291 0667 mobile phayesAT-SIGNihmc.us http://www.ihmc.us/users/phayes
Received on Monday, 4 January 2010 18:12:07 UTC