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

I have updated the grammar in rq23 in preparation for the LC candidate.  Changes 
as noted below:  syntax tests in Syntax/ updated; sort tests (not the approved 
one - that's unaffected) synatx updated.

 Andy

Seaborne, Andy wrote:
> 
> 
> 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

Change not done.  We seem to be sticking with str() only.

> 
> 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.

Asking around I did not discover anyone with an opinion one way or the other.
The case was made to be that programming languages would take 12.5 to be a 
float/double.

Left as xsd:double.

I did do the chnage to make sure it all worked:

Currently:
12      is an   xsd:integer
12.5    is an   xsd:double
12.5e0  is an   xsd:double.

With the change:
12      would be an   xsd:integer
12.5    would be an   xsd:decimal
12.5e0  would be an   xsd:double.

> 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.

Done.

-------------------------------

ORDER BY with expressions:

I have put in syntax 1 from 0259 to allow expressions for ORDER BY conditions.

Examples:

ORDER BY (?a+?b)
ORDER BY ASC(?a+?b)
ORDER BY ?a
ORDER BY ?a ?b
ORDER BY DESC(?a+?b) ?c


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

 Andy

Received on Friday, 27 May 2005 09:13:57 UTC