Hi,
if I change the `base_iri` attribute of an ontology this change is lost after saving to a file. How can I change the base_iri such that this change is permanent?
Minimal example:
import owlready2 as owr
# create ontology in the default_world
onto = owr.get_ontology("https://w3id.org/old/onto#")
with onto:
class Node(owr.Thing):
pass
fname = "tmp.owl.xml"
new_iri = "https://foo.bar/onto#"
onto.base_iri = new_iri
print(onto.base_iri)
onto.save(fname)
w = owr.World()
onto2 = w.get_ontology(fname).load()
print(onto2.base_iri)
This outputs
https://foo.bar/onto#https://w3id.org/old/onto#But I want the output
https://foo.bar/onto#https://foo.bar/onto#Best,
Carsten