Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

owx rendering differences with OWL API #6

Closed
Eugenio2192 opened this issue Oct 8, 2022 · 8 comments
Closed

owx rendering differences with OWL API #6

Eugenio2192 opened this issue Oct 8, 2022 · 8 comments

Comments

@Eugenio2192
Copy link
Contributor

This probably belongs to the horned-owl itself but I discovered it here so I write it here first in case you find a root cause in this library.

So I have been using this in parallel with ROBOT to try out some automatic checks and I noticed that if I read a owx file written by ROBOT(OWLAPI) and then read it in into py-horned-owl and then save it without altering it I get an inconsistency that makes the file not undestandable by OWLAPI. The xml Namespaces are not appearing. See this example:

This is the header of the output of OWLAPI:

<?xml version="1.0"?>
<Ontology xmlns="http://www.w3.org/2002/07/owl#"
     xml:base="http://openenergy-platform.org/ontology/oeo/oeo-physical/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:xml="http://www.w3.org/XML/1998/namespace"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     ontologyIRI="http://openenergy-platform.org/ontology/oeo/oeo-physical/"
     versionIRI="http://openenergy-platform.org/ontology/oeo/dev/oeo-physical.omn">
    <Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/>
    <Prefix name="rdf" IRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
    <Prefix name="xml" IRI="http://www.w3.org/XML/1998/namespace"/>
    <Prefix name="xsd" IRI="http://www.w3.org/2001/XMLSchema#"/>
    <Prefix name="rdfs" IRI="http://www.w3.org/2000/01/rdf-schema#"/>

This is the output of horned-owl:

<?xml version="1.0"?>
<Ontology xmlns="http://www.w3.org/2002/07/owl#">
    <Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/>
    <Prefix name="rdf" IRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
    <Prefix name="xml" IRI="http://www.w3.org/XML/1998/namespace"/>
    <Prefix name="xsd" IRI="http://www.w3.org/2001/XMLSchema#"/>
    <Prefix name="rdfs" IRI="http://www.w3.org/2000/01/rdf-schema#"/>

When I try to convert this last version to something else using OWLAPI I get an empty file.

I don't see the generation of these Namespaces happening anywhere here:

https://github.com/phillord/horned-owl/blob/e33ea9e98df83773ddead0bbe438955690b6b73c/src/io/owx/writer.rs#L228

So the root cause may be there. If you think the same I can just bring this issue to @phillord

@jannahastings
Copy link
Collaborator

@phillord what do you think?

@phillord-ncl
Copy link

It's simple to reproduce on horned with:

cargo run --bin horned-round src/ont/owl-xml/some.owx

So, it's my fault. I'll open a bug report on horned.

@phillord
Copy link

phillord commented Oct 28, 2022

@Eugenio2192 Out of curiosity, when you say the file is "not understandable" by the OWL API, how are you detecting this?

I'm trying to write a test and the OWL API parses the output fine (but doesn't find any classes!).

@Eugenio2192
Copy link
Contributor Author

@Eugenio2192 Out of curiosity, when you say the file is "not understandable" by the OWL API, how are you detecting this?

I'm trying to write a test and the OWL API parses the output fine (but doesn't find any classes!).

As far as I remember that's more or less what I meant.

@jannahastings
Copy link
Collaborator

@phillord What is the status here, is the issue in Horned-OWL resolved?

@areleu
Copy link
Contributor

areleu commented Mar 4, 2024

Hello just wanted to point out that there are still rendering differences. Prefixes are not rendering.

I recently figured out that EquivalentClass axioms are not being parsed. I don't know if this is also coming from the rust library or from this one. Nevermind, this is not an issue, the axioms were only scrambled around the file :)

Here is a small example pair, ao_infrastructure.owx is the output from OWLAPI and the file ao_infrastructure_pho.owx

example_rendering.zip

Nevertheless, I wanted to say thanks for the great job, the tool is still very bare-bones but can already do pretty cool things. Thanks thanks thanks!

@Eugenio2192
Copy link
Contributor Author

Hello just wanted to point out that there are still rendering differences. Prefixes are not rendering.

I recently figured out that EquivalentClass axioms are not being parsed. I don't know if this is also coming from the rust library or from this one. Nevermind, this is not an issue, the axioms were only scrambled around the file :)

Here is a small example pair, ao_infrastructure.owx is the output from OWLAPI and the file ao_infrastructure_pho.owx

example_rendering.zip

Nevertheless, I wanted to say thanks for the great job, the tool is still very bare-bones but can already do pretty cool things. Thanks thanks thanks!

It is actually fixed, the problem there was arising because the environment I was using had an older installation. I tried again at home and the owx files are rendering properly (almost, still no new lines per ontology prefixes, but functionality is there) I will close this issue.

@jannahastings
Copy link
Collaborator

Awesome! Thanks @Eugenio2192 , @areleu and @phillord !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants