Trouble in process Protégé -> owlready2 -> Protégé

classic Classic list List threaded Threaded
3 messages Options
Fla
Reply | Threaded
Open this post in threaded view
|

Trouble in process Protégé -> owlready2 -> Protégé

Fla
Hi all,

Come back with my questions after a long time of rest ;-)

my domain onto is based on those concepts https://github.com/BDI-UFRGS/GeoCoreOntology
and developed with Protégé. Everything is saved using rdf/xml syntax.

I'm using owlread2 0.26

I can load my onto without any trouble :

import owlready2 as owl2
owl2.onto_path.append("./")
my_onto = owl2.get_ontology(my_ontology).load()

With no any modification I saved it using :
my_onto.save(my_onto_bis,format='rdfxml')

==> BUT when i try to load it in Protégé i get some SAX error :

org.xml.sax.SAXParseException; systemId: file:PATH_TO_MY_ONTO/my_onto.owl; lineNumber: 1334; columnNumber: 12; Le type d'élément "geoc:UFRGS" doit être suivi des spécifications d'attribut, ">" ou "/>".


Contet around lineNumber 1334 :
...
1332: </rdf:Description>
1333:
1334: <geoc:UFRGS:GeoCoreOntology_geological_age rdf:about="#Aalenian">
1335:  <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#NamedIndividual"/>
1336:  <core:inScheme rdf:resource="urn:ICS:2010:geological_time_scale"/>
1337:  <lowerThan rdf:resource="#Bajocian"/>
1338:  <upperThan rdf:resource="#Toarcian"/>
...


Any suggestion will be warmly welcome !!

Thank you

Fla
Reply | Threaded
Open this post in threaded view
|

Re: Trouble in process Protégé -> owlready2 -> Protégé

Jiba
Administrator
Hi,

The problem was caused by the colon (":") in some entity IRI (e.g. UFRGS:GeoCoreOntology_geological_age). I fixed Owlready parser so as it now support ":" in IRI, in the development version of Owlready (on Bitbucket).

Nevertheless, I recommend to avoid ":" in IRI, since it can lead to ambiguous situation, for example, in <owl:Class rdf:about="ufrgs:Geo">, should "ufrgs" be understood as the scheme of the URL, or "ufrgs:Geo" as an URL relative to the ontology?

Jiba
Fla
Reply | Threaded
Open this post in threaded view
|

Re: Trouble in process Protégé -> owlready2 -> Protégé

Fla
Hi JiBa,
I confirm : you have solved my current problem, so thank you !

Fla