<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.bioontology.org//mediawiki/index.php?action=history&amp;feed=atom&amp;title=OboInOwl%3AURIs</id>
	<title>OboInOwl:URIs - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.bioontology.org//mediawiki/index.php?action=history&amp;feed=atom&amp;title=OboInOwl%3AURIs"/>
	<link rel="alternate" type="text/html" href="https://www.bioontology.org//mediawiki/index.php?title=OboInOwl:URIs&amp;action=history"/>
	<updated>2026-06-05T10:04:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>https://www.bioontology.org//mediawiki/index.php?title=OboInOwl:URIs&amp;diff=3930&amp;oldid=prev</id>
		<title>Cjm at 00:26, 14 September 2006</title>
		<link rel="alternate" type="text/html" href="https://www.bioontology.org//mediawiki/index.php?title=OboInOwl:URIs&amp;diff=3930&amp;oldid=prev"/>
		<updated>2006-09-14T00:26:02Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
=URIs in the obo2owl mapping=&lt;br /&gt;
&lt;br /&gt;
OBO IDs have no defined syntax, but they are recommended to be of the&lt;br /&gt;
form &amp;lt;IDSPACE&amp;gt; &amp;quot;:&amp;quot; &amp;lt;LOCALID&amp;gt;. Future versions of the obo format spec&lt;br /&gt;
may get stricter. Currently all IDs in extant Obo files conform to the&lt;br /&gt;
recommended form, with the exception of IDs for relations defined in&lt;br /&gt;
the same ontology, and IDs for subsetsdefs. These IDs are &amp;quot;flat&amp;quot;, as&lt;br /&gt;
they contain no &amp;quot;:&amp;quot;. Flat IDs are problematic, and their use will be&lt;br /&gt;
clarified in future versions of the spec.&lt;br /&gt;
&lt;br /&gt;
OBO IDs must be converted to URIs for use in OWL. The rules for&lt;br /&gt;
converting OBO IDs to URIs in the current mapping are as follows:&lt;br /&gt;
&lt;br /&gt;
IF the obo header declares an idspace mapping of the form:&lt;br /&gt;
&lt;br /&gt;
  idspace: GO http://www.go.org/owl/&lt;br /&gt;
&lt;br /&gt;
(note the trailing slash)&lt;br /&gt;
&lt;br /&gt;
THEN all OBO IDs of form GO:0000001 will be mapped to URIs:&lt;br /&gt;
&lt;br /&gt;
  http://www.go.org/owl/0000001&lt;br /&gt;
&lt;br /&gt;
OTHERWISE all OBO IDs of form GO:0000001 will be mapped to URIs:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;default-base-uri&amp;gt;GO/0000001&lt;br /&gt;
&lt;br /&gt;
UNLESS the OBO ID is 'flat' (ie contains no ':'), in which case 'foo'&lt;br /&gt;
will be mapped to:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;default-base-uri&amp;gt;_global/foo&lt;br /&gt;
&lt;br /&gt;
(flat IDs are problematic. Currently they only occur in some relation&lt;br /&gt;
declarations. We will work towards deprecating these, and forcing&lt;br /&gt;
people to qualify all IDs with an ID-space)&lt;br /&gt;
&lt;br /&gt;
The proposed &amp;lt;default-base-uri&amp;gt; will move from the geneontology.org&lt;br /&gt;
namespace to the bioontology.org namespace, and will be something like&lt;br /&gt;
&amp;quot;http://www.bioontology.org/oboContent/&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This will give default URIs of the form&lt;br /&gt;
&amp;quot;http://www.bioontology.org/oboContent/GO/0000001&amp;quot;. However, GO will&lt;br /&gt;
explicitly declare an idspace and other OBO ontologies will be&lt;br /&gt;
invited to do likewise.&lt;br /&gt;
&lt;br /&gt;
The current XSLT uses a default base URI of&lt;br /&gt;
&amp;quot;http://www.bioontology.org/2006/02/&amp;quot;. I'm relatively neutral as to&lt;br /&gt;
the form of the URI. I always feel the date-oriented method gives a&lt;br /&gt;
false impression that a resource may be outdated. I'm hoping some&lt;br /&gt;
other NCBO members will chip in here. I'm mostly neutral on whether&lt;br /&gt;
the final character is a hash or a slash. See below.&lt;br /&gt;
&lt;br /&gt;
By declaring an idspace, ontology maintainers can decide for&lt;br /&gt;
themselves on hash-vs-slash, and whether they want URIs to be&lt;br /&gt;
dereferenceable.&lt;br /&gt;
&lt;br /&gt;
For example, with an idspace declaration&lt;br /&gt;
&lt;br /&gt;
  idspace: GO http://www.go.org/owl#&lt;br /&gt;
&lt;br /&gt;
The OBO ID &amp;quot;GO:0000001&amp;quot; will be converted to:&lt;br /&gt;
&lt;br /&gt;
  http://www.go.org/owl#0000001&lt;br /&gt;
&lt;br /&gt;
There are two problems with the scheme above.&lt;br /&gt;
&lt;br /&gt;
(a) In the RDF/XML serialisation, we cannot declare an XML namespace&lt;br /&gt;
for the OBO idspace, because the local ID typically starts with a&lt;br /&gt;
number, which is not a valid NMTOKEN. This is not a showstopper, as&lt;br /&gt;
there is no requirement (AFAIK) to declare a namespace for URIs. We&lt;br /&gt;
can use XML entity declarations to achieve compactness in the&lt;br /&gt;
resulting document. I don't know enough about non RDF/XML&lt;br /&gt;
serialisations - N3, Turtle, OWL abstract syntax - to comment on&lt;br /&gt;
whether there will be problems here&lt;br /&gt;
&lt;br /&gt;
(b) Protege treats everything after the # or / as the local ID, and&lt;br /&gt;
having a numeric ID causes problems with the Protege display. SWOOP&lt;br /&gt;
doesn't suffer from this problem.&lt;br /&gt;
&lt;br /&gt;
Because of this problem, I considering an alternate rule. Here we&lt;br /&gt;
would do some string hacking to make the URIs more conformant to the&lt;br /&gt;
style typically seen in semantic web documents.&lt;br /&gt;
&lt;br /&gt;
With the &amp;quot;underscore&amp;quot; URI rule, the IDspace would be concatenated to&lt;br /&gt;
an underscore, followed by the local ID&lt;br /&gt;
&lt;br /&gt;
For example, with the following header&lt;br /&gt;
&lt;br /&gt;
  idspace: GO http://www.go.org/owl#&lt;br /&gt;
&lt;br /&gt;
We would have URIs of the form http://www.go.org/owl#_0000001&lt;br /&gt;
&lt;br /&gt;
And with the following header&lt;br /&gt;
&lt;br /&gt;
  idspace: GO http://www.go.org/owl/&lt;br /&gt;
&lt;br /&gt;
We would have URIs of the form http://www.go.org/owl/_0000001&lt;br /&gt;
&lt;br /&gt;
The current XSLT allows this as an option by passing in the&lt;br /&gt;
localid_prefix parameter.&lt;br /&gt;
&lt;br /&gt;
I have not yet decided whether to make this the default. On the one&lt;br /&gt;
hand, I find any kind of string hacking on the ID distasteful, it&lt;br /&gt;
complicates round-tripping. One the other hand, it appears that if one&lt;br /&gt;
deviates from common forms yet remains within the XML/RDF spec stack&lt;br /&gt;
one still pays the price in unusual software behaviour.&lt;br /&gt;
&lt;br /&gt;
==Xrefs==&lt;br /&gt;
&lt;br /&gt;
Obo format also allows &amp;quot;xrefs&amp;quot; to external database resources. Unlike&lt;br /&gt;
relationship tags, these have no fixed semantics. Sometimes it is used&lt;br /&gt;
to indicate an analagous resource. These may not always be ontological&lt;br /&gt;
resources - they can include a pubmed ID for example, or an instance&lt;br /&gt;
of a GO curator(!).&lt;br /&gt;
&lt;br /&gt;
Xrefs follow similar rules to OBO IDs. However, a different base URI&lt;br /&gt;
is used. This by default is in the bioontology space for now, but it&lt;br /&gt;
would be good if between GO, NCBO, BioPAX, BioMoby, LSRN and whoever&lt;br /&gt;
else is interested in this kind of thing came up with a proposal. I&lt;br /&gt;
don't think the service performing the obo2owl mapping should have to&lt;br /&gt;
use some web-service to get this information. Rather, all xrefs should&lt;br /&gt;
by default map to a central base URI which can dynamically resolve these.&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
&lt;br /&gt;
  http://xref.somewhere.org/foo/EC:1.1.1.1&lt;br /&gt;
&lt;br /&gt;
In the absence of a somewhere.org we'll use biointology.org in the&lt;br /&gt;
XSLT for now.&lt;br /&gt;
&lt;br /&gt;
==Hash-vs-slash==&lt;br /&gt;
&lt;br /&gt;
Using the idspace header tag, ontology maintainers can choose whether&lt;br /&gt;
to make their URIs hashy or slashy. The choice depends partly on what&lt;br /&gt;
the function of a URI is, and what the URI should dereference to, if&lt;br /&gt;
anything, and the method of dereferencing.&lt;br /&gt;
&lt;br /&gt;
If a URI is dereferenceable by a human, it may be inappropriate to use&lt;br /&gt;
#, since dereferencing in a web browser will force loading of the&lt;br /&gt;
whole ontology (which may be huge). If the URI is intended to be&lt;br /&gt;
dereferenced by a machine, one that specifically expects OWL, then it&lt;br /&gt;
makes sense to return the whole ontology and not just an OWL document&lt;br /&gt;
with one class.&lt;br /&gt;
&lt;br /&gt;
One nice thing about the LSID standard is that is provides a clear&lt;br /&gt;
separation between these use cases. We can still do the same thing&lt;br /&gt;
with http URIs, but we need consistent ways of implementing this.&lt;br /&gt;
&lt;br /&gt;
Ontologies lacking an idspace header will get assigned a default&lt;br /&gt;
IDspace, probably in the bioontology.org domain. The NCBO will make&lt;br /&gt;
the decision as to whether this will be hash-or-slash.&lt;br /&gt;
&lt;br /&gt;
Comments on best practices welcome.&lt;br /&gt;
&lt;br /&gt;
I have added some examples of OWL exported using various policies:&lt;br /&gt;
&lt;br /&gt;
using a hash-based URI:&lt;br /&gt;
&lt;br /&gt;
* llm-hash.owl&lt;br /&gt;
* llm-hash-with-prefix.owl (with a _ in the local part of the ID)&lt;br /&gt;
&lt;br /&gt;
using a slash-based URI:&lt;br /&gt;
&lt;br /&gt;
* llm-slash.owl&lt;br /&gt;
* llm-slash-with-prefix.owl (with a _ in the local part of the ID)&lt;br /&gt;
&lt;br /&gt;
These can all be found in go-dev cvs&lt;br /&gt;
&lt;br /&gt;
http://geneontology.cvs.sourceforge.net/geneontology/go-dev/xml/examples/&lt;/div&gt;</summary>
		<author><name>Cjm</name></author>
	</entry>
</feed>