Re: Several minor problems in the grammar for the functional-style syntax

Hi Boris,

(this is an answer both on this mail and the other thread...)

Boris Motik wrote:
> Hello,
> 
> [snip]
> 
>>>                                                                           I
>>> present below the problems, as well as the possible solutions. Most of the
>>> problems are caused by the syntax of CURIE, which is defined like this:
>>>
>>> curie := [[prefix] ":"] irelative-ref
>>> prefix := NCName
>>> NCName := defined by XML
>>> irelative-ref: defined by the IRI spec
>>>
[snip]
>>
> 
> It is true that NCName cannot contain whitespace, and this is not the issue
> here. The question is whether whitespace is allowed *between* prefix, ":", and
> irelative-ref -- that is, between NCName tokens. 
> 

The way I read the grammar seems to be clear that there is _no_
whitespace between the prefix and the ':'. But, anyway, if the text
emphasizes it, that does not harm!

[snip]

> 
> This would solve the second part of the problem; however, it would not solve the
> former part of the problem, which is due to the fact that CURIEs can contain the
> special characters @()^"=<> that we use to delimit the syntax. Consider the
> following axioms (there is deliberately no space between the axioms; we allow
> this at the moment):

[snip the details]

Got you! And you are right.

> 
> I believe that the only (sane) way of fixing this problem is to prohibit the
> special characters @()^"=<> from occurring in the CURIEs. The only way to make
> this happen is to strengthen the irelative-ref production. My proposal was to go
> all the way down to NCName, which would make the grammar simpler.
> 

I also saw your other mails talking of using either (a) safe curies or
(b) asking for encoding. I think both solutions are clumsy, so I agree
that your original solution is better.

This came up in the other thread: I guess the same rules should apply
for MS and OWL/XML (although I am not sure it is technically necessary
for OWL/XML, but a consistency among the various syntaxes should be
followed).

Actually... I can see the value in Peter's approach to push for the
compatibility with SPARQL and take over whatever SPARQL does. If you are
willing to go down that road, I would agree with that...

(for reference, I guess Peter referred to:

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

as the definition for the local name)


> We can send this feedback to the editors of the CURIE spec; however, I doubt
> that they will be able to really come up with a magical solution: I really thin
> we will need to kick @()^"=<> our from CURIEs.
> 

True. But the CURIE spec seems to be written with the intention to be
included in 'hosting languages' as they say and a feedback showing that,
at least for some hosting languages, this does not work is valuable for
them. They may cite alternatives for their rules; up to them. Even if we
decide (as Bijan suggests, if I understand it well) to remove the CURIE
reference from our spec and put there our own syntax rules (I would
probably use the SPARQL ones), it is good for them to know the reasons...

[snip]
>>>
>> I am not sure I understand. In RDFa, for example, the curie production
>> '_:X' is used for BNodes which is in line with our definition of nodeID.
>> CURIE allows the definition of '_:' in a specific host language as we
>> want. So what is the problem exactly?
>>
> 
> The problem is that our grammar uses two productions: one for CURIE and one for
> nodeIDs. Since there is lexical overlap between the two, it is not clear
> whether, for exmaple, _:a is a CURIE or a nodeID. In order to obtain an
> unambiguous grammar, we would need to strengthen our definitions such that the
> CURIE production does not match _:a, but only nodeID does.
> 

Got you! +1

Cheers

Ivan

-- 

Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Sunday, 22 March 2009 16:01:26 UTC