W3C home > Mailing lists > Public > public-rif-wg@w3.org > May 2008

Re: DTB status (on today's agenda)

From: Axel Polleres <axel.polleres@deri.org>
Date: Fri, 02 May 2008 14:51:56 +0100
Message-ID: <481B1C7C.9010804@deri.org>
To: debruijn@inf.unibz.it
CC: "Public-Rif-Wg (E-mail)" <public-rif-wg@w3.org>

Jos de Bruijn wrote:
> 
> 
> Sandro Hawke wrote:
>>> Let me reiterate (for the third time) my extremely simple compromise
>>> proposal.  Here expand(foo) means substitute with the prefix 
>>> definition of
>>> foo.
>>>
>>> 1. Standalone occurrence:
>>>     foo:bar ---> "expand(foo)bar"^^"http://www.w3.org/2007/rif#iri"
>>>
>>> 2. A ^^-occurrence:
>>>     "abc"^^foo:bar ----> "abc"^^"expand(foo)bar"
>>
>> I can live with this, if we don't use "^^".   This was the second option
>> in my e-mail, although I accidentally expanded bar as well.
>>
>> The problem with ^^ is that it's very distinctive and is used in other
>> semantic web languages.  But in those languages, it's followed by a URI
>> constant not a string constant.    So I'd have to object that re-using
>> ^^ with this kind of type difference is too confusing to users.
> 
> I thought that in RIF ^^ is also always followed by an IRI constant?

In those other languages you are speaking about, it is followed by a IRI 
in angle brackets or a CURIE:

N3: http://www.w3.org/TeamSubmission/n3/

    literal ::=	string dtlang
    dtlang ::=   "@"  langcode |	 "^^"  symbol
    symbol ::= explicituri | qname
    explicituri ::= <[^>]*>
    qname ::= /* what we called CURIE */

Turtle: http://www.w3.org/TeamSubmission/turtle/

    literal ::=  quotedString ( '@' language )? | datatypeString
                 | integer | double | decimal | boolean
    datatypeString ::= 	quotedString '^^' resource
    resource ::= uriref | qname
    uriref ::= '<' relativeURI '>'
    qname ::= /* what we called CURIE */


SPARQL: http://www.w3.org/TR/rdf-sparql-query/

  RDFLiteral ::= String ( LANGTAG | ( '^^' IRIref ) )?

  IRI_REF ::= '<' ([^<>"{}|^`\]-[#x00-#x20])* '>'

  Note: No CURIEs allowed in the Grammar there for the type, although
      they use CURIEs in the examples in the spec... actually, that 
seems to be a bug in their grammar.




> I think we should stick with the ^^ in RIF, because its use actually 
> generalizes the use in the other semantic Web languages.

I fully agree that RIF presentation syntax should generalize those 
languages, yes. We already defer by putting the langtag in side the 
string, BTW.


Axel

> Best, Jos
> 
>>
>> In my previous e-mail I wrote  a^^b as lit(a,b), which seems about
>> right.   I'm not sure what we should call "lit".   SWI-Prolog calls in
>> "type(b, a)". [1]
>> I suppose the obvious thing is "Const", so the change in the grammar is:
>>
>> Remove:
>>
>>    Const          ::= '"' UNICODESTRING '"^^' SYMSPACE
>>
>> Add (trying to keep current style):
>>
>>    Const          ::= 'Const(' '"' UNICODESTRING ',' '"' SYMSPACE '"' ')'
>>
>> Does that work?
>>
>> I'd also consider putting the symspace first (as in SWI-Prolog), because
>> in a sense it's the most-significant part.
>>
>>> If you do not like "..." for the after the ^^-part, use '...' or even 
>>> <...>.
>>> But, in the latter case, <...> CANNOT be used as a macro. That is,
>>>
>>>    <abc>  --X--> "abc"^^rif:iri.
>>>
>>> is a no-no.
>>>
>>> My proposal allows some simple form of context sensitivity, but not the
>>> above <...> macro atrocity (if <...> is also used after the ^^).
>>> I do not see why we need such a macro in the first place, if in most 
>>> cases
>>> we will be using foo:bar.
>>
>> I can't think of any reason we need "<" ... ">", but we might.   I think
>> we can leave them out until/unless we need them.
>>
>>       -- Sandro
>>
>> [1] http://www.swi-prolog.org/packages/rdf2pl.html#sec:3.1
>>
> 


-- 
Dr. Axel Polleres, Digital Enterprise Research Institute (DERI)
email: axel.polleres@deri.org  url: http://www.polleres.net/

rdfs:Resource owl:differentFrom xsd:anyURI .
Received on Friday, 2 May 2008 13:52:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:33:48 GMT