W3C home > Mailing lists > Public > public-owl-dev@w3.org > July to September 2011

Re: Colon symbol in URI?

From: Dave Reynolds <dave.e.reynolds@gmail.com>
Date: Sat, 13 Aug 2011 17:34:11 +0100
To: Jonathan Rees <jar@creativecommons.org>
Cc: OWL Development Mailing List <public-owl-dev@w3.org>, zhutchok@ebi.ac.uk
Message-ID: <1313253251.2524.31.camel@Obsidian3>
On Fri, 2011-08-12 at 13:50 -0400, Jonathan Rees wrote: 
> But URI syntax, in particular whether you can put two colons in a URI
> (i.e. RDF URI Reference and/or IRI), is not up to any of these
> specifications. That would be up to RFC 3986, which delegates to RFC
> 2616, which delegates to RFC 2396, which says that : is reserved and
> has to be %-escaped. In practice I suspect this is not always done,
> and perhaps the new IRI spec (in progress) will say something about
> that.

Not sure that's right. The relevant grammar rules from RFC 3986 are:

      path          =   path-absolute   / ... other options omitted

      path-absolute = "/" [ segment-nz *( "/" segment ) ]

      segment       = *pchar
      segment-nz    = 1*pchar
      pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"

So "SMTH:0000353" is a legal segment and "/obo/SMTH:0000353" a legal
path and "http://purl.obofoundry.org/obo/SMTH:0000353" a legal URI.
Isn't it?

The same was true in RFC2396:

      path          = [ abs_path | opaque_part ]

      path_segments = segment *( "/" segment )
      segment       = *pchar *( ";" param )
      param         = *pchar

      pchar         = unreserved | escaped |
                      ":" | "@" | "&" | "=" | "+" | "$" | ","

As Markus says, it can't be abbreviated to QName form in RDF/XML and so
can't be used as a property but you *can* use it as a class and still
serialize in RDF/XML because there is no requirement to use abbreviated
forms for classes. For example, Jena will produce legal RDF/XML such as:

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:j.0="http://purl.obofoundry.org/obo/SMTH:0000353"
    xmlns:owl="http://www.w3.org/2002/07/owl#">
  <owl:Class rdf:about="http://purl.obofoundry.org/obo/SMTH:0000353"/>
  <rdf:Description rdf:about="http://www.openjena.com/test#i">
    <rdf:type
rdf:resource="http://purl.obofoundry.org/obo/SMTH:0000353"/>
  </rdf:Description>
</rdf:RDF>


Dave
Received on Saturday, 13 August 2011 16:34:44 GMT

This archive was generated by hypermail 2.3.1 : Wednesday, 27 March 2013 09:32:59 GMT