Frederike Neuber
2018-11-18 13:25:07 UTC
Dear list,
while working with Protégé, I faced a problem concerning prefixes of
namespaces that change when I export my ontology with inferred axioms. The
prefixes that change are my project specific prefix (letâs call it
âpref-v2â for âversion 2â) and the frbr-prefix. I hope I can make the issue
clearer with the example that follows.
Before exporting the ontology, the namespace declarations in the xml/rdf
file look like this:
<rdf:RDF xmlns="http://myontology.de/example#"
xml:base="http://myontology.de/example"
xmlns:pref-v2="http://myontology.de/example#"
xmlns:frbr="http://purl.org/vocab/frbr/core#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:dc="http://purl.org/dc/terms/">
In the Protégé GUI, the prefixes are like above also displayed in the
Active Ontology > Ontology Prefixes tab.
Now, here are the prefixes after the export with inferred axioms:
<rdf:RDF
xmlns:pref-v1="http://glossa.uni-graz.at/o:stgd.ontology#"
xmlns:core="http://purl.org/vocab/frbr/core#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:terms="http://purl.org/dc/terms/"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
[Quick note: I deleted the base-uri and the default namespace because the
ontology has now to be integrated in a triple store and all vocabularies
should appear with namespace-prefixes.]
As you can see, my project prefix and the frbr prefix changed. The latter
changes automatically to âcoreâ. The former, the prefix I chose form my
ontology, changed to a prefix I set in the very beginning, when setting up
the ontology. Now I found a shorter and more expressive prefix and I would
like to replace the prefix pref-v1 with pref-v2. This also works in the
non-exported version of the ontology. However, as soon as I export the
ontology, the new prefix is replaced by the old one.
Can anyone help? Am I missing something?
Cheers,
Frederike
while working with Protégé, I faced a problem concerning prefixes of
namespaces that change when I export my ontology with inferred axioms. The
prefixes that change are my project specific prefix (letâs call it
âpref-v2â for âversion 2â) and the frbr-prefix. I hope I can make the issue
clearer with the example that follows.
Before exporting the ontology, the namespace declarations in the xml/rdf
file look like this:
<rdf:RDF xmlns="http://myontology.de/example#"
xml:base="http://myontology.de/example"
xmlns:pref-v2="http://myontology.de/example#"
xmlns:frbr="http://purl.org/vocab/frbr/core#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:dc="http://purl.org/dc/terms/">
In the Protégé GUI, the prefixes are like above also displayed in the
Active Ontology > Ontology Prefixes tab.
Now, here are the prefixes after the export with inferred axioms:
<rdf:RDF
xmlns:pref-v1="http://glossa.uni-graz.at/o:stgd.ontology#"
xmlns:core="http://purl.org/vocab/frbr/core#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:terms="http://purl.org/dc/terms/"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
[Quick note: I deleted the base-uri and the default namespace because the
ontology has now to be integrated in a triple store and all vocabularies
should appear with namespace-prefixes.]
As you can see, my project prefix and the frbr prefix changed. The latter
changes automatically to âcoreâ. The former, the prefix I chose form my
ontology, changed to a prefix I set in the very beginning, when setting up
the ontology. Now I found a shorter and more expressive prefix and I would
like to replace the prefix pref-v1 with pref-v2. This also works in the
non-exported version of the ontology. However, as soon as I export the
ontology, the new prefix is replaced by the old one.
Can anyone help? Am I missing something?
Cheers,
Frederike