- From: Jos de Bruijn <debruijn@inf.unibz.it>
- Date: Tue, 04 Mar 2008 09:28:12 +0100
- To: axel@polleres.net
- CC: Michael Kifer <kifer@cs.sunysb.edu>, "Public-Rif-Wg (E-mail)" <public-rif-wg@w3.org>
- Message-ID: <47CD081C.4050205@inf.unibz.it>
<snip/> >> I do not know. If they really mean rdf:resource then they have a semantic >> problem (I think it does not sit well with RDF semantics). > > Well, might be the case, but that's just how people use it. And there is > increasingly RDF data being published on the Web, which encodes URLs > (Locators) as rdf:resource and not as xsd:anyURI. > > >> But in your >> example below you seem to be using the xsd:anyURI *data type* -- not an >> rdf:resource -- to encode phone numbers. That has no problem. You can >> define a builtin that operates on anyURIs. > > Of course, that alternative version wouldn't have any problem, sure. > But what I wanted to say is that *nobody* does it like that. > Everybody uses option 1 below and not option 2. > > Option 1: > >>> <http://www.polleres.net/foaf.rdf#me> >>> foaf:phone <tel:+35391495723> ; >>> foaf:homepage <http://www.polleres.net/> . I am wondering why you would want to extract telephone numbers or even IRIs from identifiers in a rules language. The agent that is actually going to make the phone call or browse the homepage will use the syntactical representation of some query answers. And then, the IRI which happens to be the identifier of a homepage, for example, is not necessarily its location. >>> > > Option 2: > >>> <http://www.polleres.net/foaf.rdf#me> >>> foaf:phone "tel:+35391495723"^^xsd:anyURI ; >>> foaf:homepage "http://www.polleres.net/"^^xsd:anyURI . these are both incorrect, because an anyURI is neither a telephone number, nor a homepage. > > > But I am unsure whether we can by any means accomodate for that. > Anyway, I think that casts are not trivial to define even for typed > literals or no? Since the lex-to-val mapping is not injective in > general, how can I define for instance the cast > > xsd:string( "01"^^xsd:integer) we should use the definition of XQuery functions; i.e., use the canonical representation of integers. > In our framework, we have to give a fixed interpretation. > It says that this function is only defined for certain datatypes as > "input", but in out framework the "input" is always a TERM and for > evaluating I_F(xsd:string( "01"^^xsd:integer) ) > I need to consider the actual domain value which "01"^^xsd:integer > is mapped to and reconvert it to a string. For that example, it is still > easy, because there is a canonical string "1" which we can return. > > Now what about > > xsd:string( "http://www.example.org/theNumberOne"^^rif:iri) > > ??? Now what is the truth value of this? Depends on the current > interpretation, or no? If the curent interpretation maps the iri > http://www.example.org/theNumberOne to an element in the value space of > e.g. xsd:integer the function should return a value, if it doesn't map > http://www.example.org/theNumberOne to an element in a compatible value > space for string conversions, the function returns an error. Yes? right. > > I am not sure at the moment whether this is a problem, but it is at > least a bit contrived. In what sense? It seems completely reasonable to me that if you want to do typecasting, but the cast fails, you have an error. Best, Jos > > best, > Axel > > >>> So how do I convince all the rest of the world to change that likewise? >>> Even the RDF Primer [2] (Example 6): >>> ---------------------------------------------------------------------- >>> <rdf:Description rdf:nodeID="abc"> >>> <exterms:fullName>Dave Beckett</exterms:fullName> >>> <exterms:homePage rdf:resource="http://purl.org/net/dajobe/"/> >>> </rdf:Description> >>> ---------------------------------------------------------------------- >>> >>> or the SPARQL spec [3] (examples in Section 6): >>> >>> ---------------------------------------------------------------------- >>> @prefix foaf: <http://xmlns.com/foaf/0.1/> . >>> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . >>> >>> _:a rdf:type foaf:Person . >>> _:a foaf:name "Alice" . >>> _:a foaf:mbox <mailto:alice@example.com> . >>> _:a foaf:homepage <http://work.example.org/alice/> . >>> ---------------------------------------------------------------------- >>> >>> promote the use of rdf:resources for URLs (homepages, email-adresses, >>> etc.). It might be arguable with respect to the concepts, but people >>> *do* use URIs like that and it is even done in the specs of RDF as we >>> see here. >>> >>> How do we cater for it? By just stating I cannot get a substring out >>> of a homepage-URL or email-address... just because rdf:resource (and >>> rif:iri, respectively) are not datatypes? >>> >>> I knew somehow why I put that in my signature ;-) >>> >>> Axel >>> >>> >>> 1. http://xmlns.com/foaf/spec/ >>> 2. http://www.w3.org/TR/REC-rdf-syntax/ >>> 3. http://www.w3.org/TR/rdf-sparql-query/ >>> >>> -- >>> Dr. Axel Polleres >>> email: axel@polleres.net url: http://www.polleres.net/ >>> >>> rdfs:Resource owl:differentFrom xsd:anyURI . >>> >> >> > > -- debruijn@inf.unibz.it Jos de Bruijn, http://www.debruijn.net/ ---------------------------------------------- One man that has a mind and knows it can always beat ten men who haven't and don't. -- George Bernard Shaw
Received on Tuesday, 4 March 2008 08:28:33 UTC