W3C home > Mailing lists > Public > public-rif-wg@w3.org > January 2009

[RIF-PS] curies allow comma, parens

From: Sandro Hawke <sandro@w3.org>
Date: Thu, 29 Jan 2009 14:37:57 -0500
To: public-rif-wg@w3.org
Message-ID: <5098.1233257877@ubehebe>


I just noticed that the CURIE syntax is much broader than I expected.
All the IRI "sub-delims" are valid in CURIEs after the colon, including
comma and both parentheses.

This means most PS as written is not syntactically valid (using normal
parsing techniques).  For instance, in the BLD spec, in the first
example,

    cpt:buy(?Buyer ?Item ?Seller) :- cpt:sell(?Seller ?Item ?Buyer)

the first token a typical lexer would find is a CURIE, "cpt:buy(".  Note
the open-paren is part of the CURIE.  Then of course we'd have a syntax
error, because there's no open-parenthesis token.  It might be possible
to code around this with some clever back-tracking when we find the
open-paren is needed, but I don't think that's a good idea.

I suggest we switch (back) to qnames [1].  The only advantage to CURIEs
I know of is that more IRIs can be abreviated, but I don't think that's
worth a whole lot in our use cases.

       -- Sandro

[1] As in http://www.w3.org/TR/REC-xml-names/ and I'm not sure whether
    we want QName or PrefixedName, really.  If we allow unprefixedName, we
    need to think a little more about reserved terms.   I could also see
    forbidding the "-", so infix math doesn't require spaces.
    
Received on Thursday, 29 January 2009 19:38:09 GMT

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