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

Re: Colon symbol in URI?

From: Markus Krötzsch <markus.kroetzsch@cs.ox.ac.uk>
Date: Fri, 12 Aug 2011 09:53:50 +0100
Message-ID: <4E44EA1E.2060208@cs.ox.ac.uk>
To: zhutchok@ebi.ac.uk
CC: public-owl-dev@w3.org
On 10/08/11 23:04, zhutchok@ebi.ac.uk wrote:
> Hello all,
>
> I am trying to find out if it is possible to use colon symbol in the URI
> of RDF/OWL classes, for example:
> http://purl.obofoundry.org/obo/SMTH:0000353. On one hand, I could not find
> any mention of it being restricted on W3C web-page, but on the other hand,
> I could not find any ontology example having a colon in a class URI
> (except the colon after http) either. Moreover, OBO to OWL converters
> usually replace colon symbols used in OBO identifiers with an underscore,
> e.g. Protege will convert smth:0000053 to
> http://purl.obofoundry.org/obo/SMTH_0000353 (not to
> http://purl.obofoundry.org/obo/SMTH:0000353).
>
> Does it mean colon is prohibited?

I think it is but I have not checked the specs. The problem might be in 
the widely used RDF/XML serialization that imposes its own restrictions 
on the syntax. In particular, RDF/XML is not able to express all valid 
RDF graphs. One reason for this is that property names must be XML 
element names in this syntax, and many symbols are not allowed in local 
names in this context (including colon which is interpreted as a 
separator between namespace id and local name). This might be one reason 
why it is advisable to escape colon.

Since XML does not provide a suitable escaping mechanism, one is left 
with ad hoc escaping strategies. For example, Semantic MediaWiki uses 
the URL encoding of ":" as "%3A" and replaces the "%" with the less 
problematic character "-". The character "-" is escaped similarly, so 
the escaping can be inverted. What you describe for Protege seems to be 
a rather unfortunate approach that leads to an escaping that is not 
invertible.

Cheers,

Markus


-- 
Dr. Markus Krötzsch
Department of Computer Science, University of Oxford
Room 306, Parks Road, OX1 3QD Oxford, United Kingdom
+44 (0)1865 283529               http://korrekt.org/
Received on Friday, 12 August 2011 08:54:23 GMT

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