|
View:
New views
16 Messages
—
Rating Filter:
Alert me
|
|
|
Explicit RDF property for "literal has datatype D"?Dear all,
we are working on embedding RDF-based ontologies into another host language (see below for background). While saying that some RDF literal has a datatype is hard-coded into the syntax of any RDF serialization, we would have to make it explicit in our representation, and our representation of that would actually be quite close to RDF triples. Let me say it in terms of RDFS: There are classes rdfs:Literal and rdfs:Datatype, and what I'm looking for is just a simple property p a rdf:Property ; rdfs:domain rdfs:Literal ; rdfs:range rdfs:Datatype . I could invent p myself, but maybe there is already some established ontology that contains such a property p. Do you know any? Background, for those interested: We are working on improving the documentation of ontologies. As a means for that, we use the mathematical markup language OMDoc, which supports literate-programming-like embedding of documentation into formalized knowledge. See https://svn.omdoc.org/repos/omdoc/trunk/doc/blue/foaf and then * eswc09-poster.pdf (poster abstract) * eswc09-a0poster.pdf (poster) * mkm09.pdf (full paper, but for a more mathematical audience) Cheers, and thanks in advance, Christoph -- Christoph Lange, Jacobs Univ. Bremen, http://kwarc.info/clange, Skype duke4701 |
|
|
Re: Explicit RDF property for "literal has datatype D"?-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 On 6 Jul 2009, at 14:34, Christoph LANGE wrote: > p a rdf:Property ; > rdfs:domain rdfs:Literal ; > rdfs:range rdfs:Datatype . In terms of RDF, this can't be done. Well, the property could be defined using RDFS, but it could never legally be used. The definition would imply that "p" is used like so: "2008-01-01" p xsd:date . However, RDF doesn't allow a literal to be used as the subject of a triple. Hence there is no property defined like the "p" you describe. There are supersets of RDF (such as Notation 3) which relax this restriction and would allow a property "p" like you describe to be used. - -- Toby A Inkster <mailto:mail@...> <http://tobyinkster.co.uk> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkpSEAQACgkQzr+BKGoqfTnHfQCfV50trF0sL9InwG08FgvQfbDQ mBQAnA3dot8UHlT5bmvLtUycwQhAwYSB =cB/I -----END PGP SIGNATURE----- |
|
|
|
|
|
Re: Explicit RDF property for "literal has datatype D"?On Jul 6, 2009, at 9:53 AM, Toby A Inkster wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 6 Jul 2009, at 14:34, Christoph LANGE wrote: > >> p a rdf:Property ; >> rdfs:domain rdfs:Literal ; >> rdfs:range rdfs:Datatype . > > > In terms of RDF, this can't be done. Well, the property could be > defined using RDFS, but it could never legally be used. The > definition would imply that "p" is used like so: > > "2008-01-01" p xsd:date . rdfs:Literal is the class of literal VALUES, and bnodes and URIs can denote literal values. So you could use a bnode: _:x p xsd:date . _:x :seenAsLiteral "2008-01-01" . (I made up the second property, but you get the idea.) OR, you could just ignore this damn silly syntactic restriction and put the literal in the subject, like many RDF systems now do. Pat Hayes > > However, RDF doesn't allow a literal to be used as the subject of a > triple. Hence there is no property defined like the "p" you > describe. There are supersets of RDF (such as Notation 3) which > relax this restriction and would allow a property "p" like you > describe to be used. > > - -- > Toby A Inkster > <mailto:mail@...> > <http://tobyinkster.co.uk> > > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.8 (Darwin) > > iEYEARECAAYFAkpSEAQACgkQzr+BKGoqfTnHfQCfV50trF0sL9InwG08FgvQfbDQ > mBQAnA3dot8UHlT5bmvLtUycwQhAwYSB > =cB/I > -----END PGP SIGNATURE----- > > > ------------------------------------------------------------ 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 |
|
|
Re: Explicit RDF property for "literal has datatype D"?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 |
|
|
Re: Explicit RDF property for "literal has datatype D"?Christoph LANGE wrote:
> > y dc:date x . > > x a rdfs:Literal ; > rdf:value "2008-01-01"; > ex:datatype xsd:date . > This type of design was considered by RDF Core in 2002/2003 and the current design was preferred. You can always drill down in the archives to find some of the discussion. I think the current design involves less dependence on reasoning to get things started. Jeremy |
|
|
Re: Explicit RDF property for "literal has datatype D"?Jeremy Carroll wrote:
> 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. Hmmm... doesn't this lead to an inference something like xsd:date being the same as xsd:string? Well, not that exactly, but "2008-01-01" is a plain literal and hence self-denoting. Then the thing _:x denotes is hence (a) exactly "2008-01-01", and (b) in the value space of xsd:date, which I'm not aware of including lexical forms - is my birthday a string? #g |
|
|
Re: Explicit RDF property for "literal has datatype D"?On 6 Jul 2009, at 18:43, 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" . did you mean: _:x p xsd:date . _:x owl:sameAs "2008-01-01"^^xsd:date . otherwise you get some odd conclusions. - Steve -- Steve Harris Garlik Limited, 2 Sheen Road, Richmond, TW9 1AE, UK +44(0)20 8973 2465 http://www.garlik.com/ Registered in England and Wales 535 7233 VAT # 849 0517 11 Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD |
|
|
Re: Explicit RDF property for "literal has datatype D"?Steve Harris wrote:
> >>>> >>>>> p a rdf:Property ; >>>>> rdfs:domain rdfs:Literal ; >>>>> rdfs:range rdfs:Datatype . >> _:x p xsd:date . >> _:x owl:sameAs "2008-01-01" . > > did you mean: > > _:x p xsd:date . > _:x owl:sameAs "2008-01-01"^^xsd:date . > > otherwise you get some odd conclusions. > > - Steve I don't see any odd conclusions ... we have not said anything about the realtionship between the subject and object of a p triple, other than the usual they are related by the p-property. Jeremy |
|
|
Re: Explicit RDF property for "literal has datatype D"?On Jul 6, 2009, at 12: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 True, and that is better. > > Unfortunately the reasoning required to make this work means that > simple RDF systems may well not get it. Just doing sameAs substitution isnt itself a very heavy reasoning burden, though. Pat > > 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 |
|
|
Re: Explicit RDF property for "literal has datatype D"?On Jul 6, 2009, at 1:48 PM, Jeremy Carroll wrote: > Steve Harris wrote: >> >>>>> >>>>>> p a rdf:Property ; >>>>>> rdfs:domain rdfs:Literal ; >>>>>> rdfs:range rdfs:Datatype . >>> _:x p xsd:date . >>> _:x owl:sameAs "2008-01-01" . >> >> did you mean: >> >> _:x p xsd:date . >> _:x owl:sameAs "2008-01-01"^^xsd:date . >> >> otherwise you get some odd conclusions. >> >> - Steve > > I don't see any odd conclusions ... we have not said anything about > the realtionship between the subject and object of a p triple, other > than the usual they are related by the p-property. > Right. BTW, you could now say that the domain of p was rdf:PlainLiteral :-) http://www.w3.org/TR/rdf-plain-literal/ Pat > 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 |
|
|
Re: Explicit RDF property for "literal has datatype D"?2009-07-06 19:46 Jeremy Carroll <jeremy@...>:
> Christoph LANGE wrote: > > y dc:date x . > > > > x a rdfs:Literal ; > > rdf:value "2008-01-01"; > > ex:datatype xsd:date . > > This type of design was considered by RDF Core in 2002/2003 and the > current design was preferred. > You can always drill down in the archives to find some of the discussion. mailing list: http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001Nov/0011.html http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2002Dec/0007.html http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2002Sep/0002.html http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2002Jan/0472.html http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001Nov/0295.html As I found out, it was discussed for a while to use rdf:type in place of the ex:datatype above, but then that was found to have undesirable consequences. But now I know how _I_ will do it. I will borrow rdf:datatype from RDF/XML (http://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-datatyped-literals), which is not a _property_ in the strict sense, but just fine for my purpose. The purpose of my work is not to change the semantics of RDF, but to embed RDF with its original semantics into a new XML-based host language in order to have more expressive annotation facilities than in RDF/XML or XHTML+RDFa. So what I need for that is some _syntax_, and as a syntactic reference to the datatype of a literal, rdf:datatype is perfect. Cheers, Christoph -- Christoph Lange, Jacobs Univ. Bremen, http://kwarc.info/clange, Skype duke4701 |
|
|
Re: Explicit RDF property for "literal has datatype D"?On Mon, Jul 6, 2009 at 4:54 PM, Pat Hayes<phayes@...> wrote:
> > On Jul 6, 2009, at 1:48 PM, Jeremy Carroll wrote: > >> Steve Harris wrote: >>> >>>>>> >>>>>>> p a rdf:Property ; >>>>>>> rdfs:domain rdfs:Literal ; >>>>>>> rdfs:range rdfs:Datatype . >>>> >>>> _:x p xsd:date . >>>> _:x owl:sameAs "2008-01-01" . >>> >>> did you mean: >>> >>> _:x p xsd:date . >>> _:x owl:sameAs "2008-01-01"^^xsd:date . >>> >>> otherwise you get some odd conclusions. >>> >>> - Steve >> >> I don't see any odd conclusions ... we have not said anything about the >> realtionship between the subject and object of a p triple, other than the >> usual they are related by the p-property. >> > > Right. BTW, you could now say that the domain of p was rdf:PlainLiteral :-) > > http://www.w3.org/TR/rdf-plain-literal/ Yes, except isn't that exactly wrong? At least by the desired sense noted in the topic of the mail message "literal has datatype D". A plain literal had datatype http://www.w3.org/TR/rdf-plain-literal/ which isn't any datatype other than itself. It certainly isn't and xsd:date. Is what's trying to be said that a certain string should be interpreted as a certain datatype? But if that's the case, why not just write it "certain string"^^datatype? (if it is malformed, you will get an inconsistency, which is good!) Sorry if I'm being dense. -Alan > > Pat > > >> 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 > > > > > > > |
|
|
Re: Explicit RDF property for "literal has datatype D"?Thanks Alan, I had made a mistake of not realising that the subject line
did specify stuff about the property p. Alan Ruttenberg wrote: >> On Jul 6, 2009, at 1:48 PM, Jeremy Carroll wrote: >> >> >> >>> I don't see any odd conclusions ... we have not said anything about the >>> realtionship between the subject and object of a p triple, other than the >>> usual they are related by the p-property. >>> >>> >>> > Yes, except isn't that exactly wrong? At least by the desired sense > noted in the topic of the mail message "literal has datatype D". > This suggests that we should have been talking all along about the explicitly typed literal having datatype (or even just rdf:type) being D. p a rdf:Property ; rdfs:domain rdfs:Literal ; rdfs:range rdfs:Datatype . _:x p xsd:int . _:x owl:sameAs "2"^^xsd:int . And possibly p rdfs:subPropertyOf rdf:type . Jeremy |
|
|
Re: Explicit RDF property for "literal has datatype D"?2009-07-06 23:47 Alan Ruttenberg <alanruttenberg@...>:
> > Right. BTW, you could now say that the domain of p was rdf:PlainLiteral > > :-) > > > > http://www.w3.org/TR/rdf-plain-literal/ > > Yes, except isn't that exactly wrong? At least by the desired sense > noted in the topic of the mail message "literal has datatype D". > > A plain literal had datatype http://www.w3.org/TR/rdf-plain-literal/ > which isn't any datatype other than itself. It certainly isn't and > xsd:date. question right in the sense that I was asking for how to represent the relation between a literal and its datatype for _any_ kind of datatype -- non-plain datatypes in particular. Cheers, Christoph -- Christoph Lange, Jacobs Univ. Bremen, http://kwarc.info/clange, Skype duke4701 |
|
|
Re: Explicit RDF property for "literal has datatype D"?On Jul 6, 2009, at 4:47 PM, Alan Ruttenberg wrote: > On Mon, Jul 6, 2009 at 4:54 PM, Pat Hayes<phayes@...> wrote: >> >> On Jul 6, 2009, at 1:48 PM, Jeremy Carroll wrote: >> >>> Steve Harris wrote: >>>> >>>>>>> >>>>>>>> p a rdf:Property ; >>>>>>>> rdfs:domain rdfs:Literal ; >>>>>>>> rdfs:range rdfs:Datatype . >>>>> >>>>> _:x p xsd:date . >>>>> _:x owl:sameAs "2008-01-01" . >>>> >>>> did you mean: >>>> >>>> _:x p xsd:date . >>>> _:x owl:sameAs "2008-01-01"^^xsd:date . >>>> >>>> otherwise you get some odd conclusions. >>>> >>>> - Steve >>> >>> I don't see any odd conclusions ... we have not said anything >>> about the >>> realtionship between the subject and object of a p triple, other >>> than the >>> usual they are related by the p-property. >>> >> >> Right. BTW, you could now say that the domain of p was >> rdf:PlainLiteral :-) >> >> http://www.w3.org/TR/rdf-plain-literal/ > > Yes, except isn't that exactly wrong? At least by the desired sense > noted in the topic of the mail message "literal has datatype D". > > A plain literal had datatype http://www.w3.org/TR/rdf-plain-literal/ > which isn't any datatype other than itself. It certainly isn't and > xsd:date. > > Is what's trying to be said that a certain string should be > interpreted as a certain datatype? But if that's the case, why not > just write it "certain string"^^datatype? (if it is malformed, you > will get an inconsistency, which is good!) > > Sorry if I'm being dense. No, but I was probably making a mistake trying to be humorous about rdf:PlainLIteral, sorry. Would it be wrong? It depends on exactly what we are talking about here. If the subject of :p is intended to be the datatyped literal, then right, it would be wrong to say it was a plain literal. But if the subject is supposed to be the character string of the literal, then this might be one way to say that. Though even then, it would, I agree, be potentially misleading. The best way, if you can't put the literal in subject position, would be what Steve suggested above. Pat > > -Alan > > > > >> >> Pat >> >> >>> 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 |
| Free embeddable forum powered by Nabble | Forum Help |