import owlready2 as owl2
my_onto = owl2.get_ontology(my_ontology).load()
With no any modification I saved it using :
==> 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 "/>".
Re: Trouble in process Protégé -> owlready2 -> Protégé
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?