Version History
Version | Date | Comment | Lead Editor | Contributors |
---|---|---|---|---|
0.1 | 2024-04-05 | First version | ||
0.2 | 2024-05-15 | Revision to add references |
Contents
Table of Contents |
---|
Overview
This document captures what are considered best practices for serializing ontologies, so that they can be version controlled most efficiently using git. Doing so requires a canonical ordering of lines within each ontology file.
...
MUST: This word means that the definition is an absolute requirement of the specification.
MUST NOT: This phrase means that the definition is an absolute prohibition of the specification.
SHOULD: This word means that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications MUST be understood and carefully weighed before choosing a different course.
SHOULD NOT: This phrase means that there may exist valid reasons in particular circumstances when the particular behavior is acceptable or even useful, but the full implications should be understood and the case carefully weighed before implementing any behavior described with this label.
MAY: This word means that an item is truly optional. One vendor may choose to include the item because a particular marketplace requires it or because the vendor feels that it enhances the product while another vendor may omit the same item.
Syntax
According to the OWL 2 Web Ontology Language Document Overview (Second Edition), the primary exchange syntax for OWL 2 is RDF/XML. Therefore, every IOF ontology MUST be serialized in the RDF/XML syntax, using more specific rules explained in the subsequent sections.
Base IRI
According to TBD XML Base, W3C Recommendation., the xml:base
attribute of an XML element determines an IRI prefix to be prepended to every relative IRI used in any nested XML element. The following provides a fictitious example of how this mechanism works:
...
In order to ensure that the correct IRI is prepended to the value of every relative IRI in an IOF ontology, the xml:base
attribute of the rdf:RDF
XML element in every ontology file MUST have the ontology IRI as its value.
Default Namespace
Every IOF ontology MUST NOT declare a default namespace to ensure that no XML element is inadvertently put into the wrong namespace.
According to TBD Namespaces in XML 1.0 (Third Edition), W3C Recommendation,, the default namespace of an XML element determines the namespace of every nested XML element that does not have an explicit namespace. The following provides an example that is technically legal, but disallowed by this policy:
...
Note that the default namespace declaration on line 2 technically make the elements Ontology
(lines 6 and 7) and Class
(lines 9 and 11) into the fully qualified IRIs http://www.w3.org/2002/07/owl#Ontology
and http://www.w3.org/2002/07/owl#Class
, respectively, however, the use of any other non-OWL, unqualified XML element would inadvertently put that element into the OWL namespace, which is a violation of TBDbest practices for data governance generally, and goes against practices outlined in various W3C Recommendations and other documents, including but not limited to Cool URIs for the Semantic Web .
In order to ensure that no XML element is inadvertently put into the wrong namespace, every IOF ontology MUST NOT declare a default namespace.
Voting
Member | Vote | Comments | |
---|---|---|---|
1 | |||
2 | |||
3 | |||
4 | |||
5 | |||
6 | |||
7 | |||
8 | |||
9 | |||
10 | |||
11 | |||
12 | |||
13 | |||
14 | |||
15 | |||
16 | |||
17 | |||
18 | |||
19 | Total | YES: 0, NO: 0, No Response: 0 |
|