[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

languages

This page is part of the web mail archives of SRFI 83 from before July 7th, 2015. The new archives for SRFI 83 contain all messages, not just those from before July 7th, 2015.



   From: Lauri Alanko <la@xxxxxx>
   Date: Sun, 5 Mar 2006 11:44:17 +0200

   On Sun, Mar 05, 2006 at 10:34:21AM +0100, Chris Hanson wrote:
   > Although the original language specification, "scheme://r6rs", looks
   > vaguely like a URI, it's not correctly formed (see
   > "http://www.ietf.org/rfc/rfc3986.txt";;).

   Huh? I see:

      URI           = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
      scheme        = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
      hier-part     = "//" authority path-abempty
      path-abempty  = *( "/" segment )
      authority     = [ userinfo "@" ] host [ ":" port ]
      host          = IP-literal / IPv4address / reg-name
      reg-name      = *( unreserved / pct-encoded / sub-delims )
      unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"

   3.2.2 additionally notes that reg-name can use a custom namespace:

      A host identified by a registered name is a sequence of characters
      usually intended for lookup within a locally defined host or service
      name registry, though the URI's scheme-specific semantics may require
      that a specific registry (or fixed name table) be used instead. 

   So, apart from using an unregistered scheme, it is a real URI.

Ah -- I forgot about the reg-name thing.  Which is strange since I
implemented a URI parser just a year ago, and it handles reg-name
exactly as it should.  I should have just typed that string at the
parser to see what it did.

Nevertheless I still think it's a mistake to use a custom URI scheme
for this purpose, even if it's registered.  The important thing to
remember is that a URI is just a string with a funny syntax.  Meaning
is imposed by context and usage, not by the URI scheme in use.  Some
URIs need distinguished schemes because they identify particular
transport protocols, but the SRFI-83 application doesn't involve
network transport and consequently doesn't need any particular scheme.

For background: I'm approaching this from the context of the Semantic
Web.  In that world, URIs are just strings, and their meaning is
defined by their relationships to other URIs (usually written in RDF).
The fact that you might be able to dereference one of these strings to
provide a document is incidental.  When used at all, it's just a
mechanism to retrieve the documents containing the RDF.  In the
Semantic Web, the URI plays the same role that the symbol does in
Lisp.

Chris


PS: Please CC me on any reply.  I'm not reading this list.