Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Version History

Version

Date

Comment

Lead Editor

Contributors

0.1

 2024-04-05

First version

Jim Logan

Elisa Kendall

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.

The following rules MUST be followed when reviewing this document, these are taken from IETF RFC 2119 (simplified):

  1. MUST: This word means that the definition is an absolute requirement of the specification.

  2. MUST NOT: This phrase means that the definition is an absolute prohibition of the specification.

  3. 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.

  4. 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.

  5. 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, 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. For example, the following provides a fictitious example of how this mechanism works:

<?xml version="1.0" encoding="UTF-8"?>                  
<!DOCTYPE rdf:RDF [
        <!ENTITY bfo "http://purl.obolibrary.org/obo/">
]>      
<rdf:RDF xml:base="https://spec.industrialontologies.org/ontology/core/Core/"
        xmlns:bfo="http://purl.obolibrary.org/obo/"
        xmlns:iof-core="https://spec.industrialontologies.org/ontology/core/Core/"
        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>
  <owl:Class rdf:about="AgentRole">
    <rdfs:subClassOf rdf:resource="&bfo;BFO_0000023"/>
  </owl:Class>
</rdf:RDF>

The value of the rdf:about attribute on line 10 would be appended to the xml:base attribute provided on line 5 to yield the IRI https://spec.industrialontologies.org/ontology/core/Core/AgentRole.

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 MUST have the ontology IRI as its value.

Default Namespace

Appendix

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

 

  • No labels