W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2005

punctuationSyntax [was: agenda: RDF Data Access 24 May]

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Tue, 24 May 2005 10:30:50 +0100
Message-ID: <4292F44A.3090709@hp.com>
To: RDF Data Access Working Group <public-rdf-dawg@w3.org>



Dan Connolly wrote:
<snip/>

> 7. punctuationSyntax
> 
> Hmm... how to close? Grammar in the QL editor's draft OK?
> 

Things outstanding that impact the grammar:

1/ str() and uri()

http://lists.w3.org/Archives/Public/public-rdf-dawg/2005AprJun/0154.html

This would require adding uri() to the grammar - trivial.

   str() becomes an operator that accesses the lexical form of literals.
   uri(bNode) is an error.

Assuming || only evaluates RHS of the LHS is false (add extra terms otherwise):

old str(?x) = ( isURI(?x) && uri(?x) ) || (isLiteral(?x) && new str(?x) )
new str(?x) = ( isURI(?x) && old str(?x) ) || fail

fail could be some nonsense expression like 1/0

2/ 12.5 - xsd:decimal or xsd:double

If we decide that 12.5 should be an xsd:decimal, then the grammar should have 
12.5e0 as an xsd:double (c.f. XPath2).

In Xpath2, ".3" "3." are both decimals.  I hacked a version of the grammar with 
this in and found no problems against the synatx tests because this is done at 
the token level so the dot gets associated with the number, and isn't seen as a 
triple pattern separator.  c.f qnames and trailing dots.

We could choose to be more restrictive and require "0.3" and "3.0" for the above 
but there is no technical need.

I have no input from RDQL/Jena users to guide the decision - there was a bug in 
double handling for quite a long while and no one noticed from which I conclude 
it isn't the most used feature ever.

N3 would make it a double.
Turtle does not define that syntax.

Decimals are precise - doubles are rounded to the nearest representable number 
so we have "1.3"^^xsd:double != "1.3"^^xsd:decimal.  Precision seems more useful 
for the semantic web (e.g. financial data).

If I were flipping the coin, it would come down xsd:decimal but I don't have a 
strong opinion one way of the other.


3/ blank nodes as predicates

A question I have been asked a few times now (by non-WG members) is why can't a 
query have [] in the predicate position in a triple pattern on the grounds of 
symmetry.  I know of no reason why not so I propose we do this.

<snip/>

	Andy
Received on Tuesday, 24 May 2005 09:31:20 GMT

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