W3C home > Mailing lists > Public > semantic-web@w3.org > March 2005

Re: URI-Triples: RDF serialization for use in query strings

From: Benja Fallenstein <benja.fallenstein@gmail.com>
Date: Sun, 13 Mar 2005 02:59:14 +0100
Message-ID: <ff7ba12a05031217593936f0fe@mail.gmail.com>
To: semantic-web@w3.org


When working on the URI-Triples syntax, I was working from my
knowledge of RFC 2396 (URI Generic Syntax). Which has been obsoleted
in January by RFC 3986. Which makes URI-Triples in the proposed form
completely illegal, plus broken. :-(

RFC 2396 says that '_' (being in the set of unreserved characters) can
be escaped or unescaped at any time without changing the meaning of a
URI. I was using it as a delimiter, and escaping it in URI references.
Additionally, ^ and | became illegal in URIs. (Yes, I know they were
already marked as unwise, before...)

Well, I have to think about this. And re-do the code. :-/ Lucky I
haven't deployed this yet :-)

My gut feeling is to become more like the N3 family and introduce ()
around URIs (similar to <> in N-Triples/Turtle/N3), and drop the ';'
seperator inside triples, i.e. turning _;_ into just _. I'm tending to
: as the replacement for ^^. I'm not sure how to replace | -- perhaps
&, which serves a slightly similar role in the query strings generated
by HTML forms (i.e., in "application/x-www-form-urlencoded").

With this changes, my example reads


The grammar reads

query_string := (stmt "_|_")* stmt
stmt         := prefix | triple
prefix       := name "_=_(" uri ")"
triple       := (node | bnode) "_" node "_" (node | bnode | literal)
node         := qname | "(" uri ")"
qname        := name "." name
bnode        := "." name
literal      := "'" text "'" ("" | "@" langtag | ":" node)

I suppose it's not too bad, although I do find it slightly less
readable. I will have to change the code.

- Benja
Received on Sunday, 13 March 2005 02:57:27 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 07:41:45 UTC