onto-viewer icon indicating copy to clipboard operation
onto-viewer copied to clipboard

Namespaces' prefixes are not used in merged ontologies axioms

Open mereolog opened this issue 1 year ago • 2 comments

The example below illustrates the problem announced in the title - it comes from https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-RegistrationAuthorities/.

This issues is related to #362 and was identified during a review of #363.

Original

<owl:Class rdf:about="&idmp-ra;NationalCancerInstituteThesaurusEntry">
		<rdfs:subClassOf rdf:resource="&cmns-ra;RegistryEntry"/>
		<rdfs:subClassOf>
			<owl:Restriction>
				<owl:onProperty rdf:resource="&cmns-col;isIncludedIn"/>
				<owl:hasValue rdf:resource="&idmp-ra;NationalCancerInstituteThesaurus"/>
			</owl:Restriction>
		</rdfs:subClassOf>
		<rdfs:subClassOf>
			<owl:Restriction>
				<owl:onProperty rdf:resource="&cmns-col;comprises"/>
				<owl:someValuesFrom rdf:resource="&idmp-ra;NationalCenterForBiotechnologyInformationTaxonomyIdentifier"/>
			</owl:Restriction>
		</rdfs:subClassOf>
		<rdfs:subClassOf>
			<owl:Restriction>
				<owl:onProperty rdf:resource="&cmns-cxtdsg;appliesTo"/>
				<owl:someValuesFrom rdf:resource="&idmp-sub;Substance"/>
			</owl:Restriction>
		</rdfs:subClassOf>
		<rdfs:label>National Cancer Institute Thesaurus registry entry</rdfs:label>
		<rdfs:isDefinedBy rdf:resource="https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-RegistrationAuthorities/"/>
		<skos:definition>entry in the National Cancer Institute Thesaurus that includes the National Cancer Institute Thesaurus Code used in electronic listing and other regulatory activities</skos:definition>
	</owl:Class>

Merged

    <owl:Class rdf:about="https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-RegistrationAuthorities/NationalCancerInstituteThesaurusEntry">
        <rdfs:subClassOf rdf:resource="https://www.omg.org/spec/Commons/RegistrationAuthorities/RegistryEntry"/>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="https://www.omg.org/spec/Commons/Collections/comprises"/>
                <owl:someValuesFrom rdf:resource="https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-RegistrationAuthorities/NationalCenterForBiotechnologyInformationTaxonomyIdentifier"/>
            </owl:Restriction>
        </rdfs:subClassOf>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="https://www.omg.org/spec/Commons/ContextualDesignators/appliesTo"/>
                <owl:someValuesFrom rdf:resource="https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-Substances/Substance"/>
            </owl:Restriction>
        </rdfs:subClassOf>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="https://www.omg.org/spec/Commons/Collections/isIncludedIn"/>
                <owl:hasValue rdf:resource="https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-RegistrationAuthorities/NationalCancerInstituteThesaurus"/>
            </owl:Restriction>
        </rdfs:subClassOf>
        <rdfs:isDefinedBy rdf:resource="https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-RegistrationAuthorities/"/>
        <rdfs:label>National Cancer Institute Thesaurus registry entry</rdfs:label>
        <skos:definition>entry in the National Cancer Institute Thesaurus that includes the National Cancer Institute Thesaurus Code used in electronic listing and other regulatory activities</skos:definition>
    </owl:Class>

mereolog avatar Jun 16 '23 15:06 mereolog

This is caused by the fact that OWL-API which we are using for serializing a merged ontology doesn't seem to support the use of XML DTD which is needed for this to work. I propose adding a step in ontology-publisher that will use RDF Toolkit that supports XML DTD.

trojczak avatar Jun 30 '23 11:06 trojczak

This is caused by the fact that OWL-API which we are using for serializing a merged ontology doesn't seem to support the use of XML DTD which is needed for this to work. I propose adding a step in ontology-publisher that will use RDF Toolkit that supports XML DTD.

The solution with RDF Toolkit will not work because once we save the merged ontology in RDF/XML format all DTD data is lost, so rdf-toolkit cannot bring them back.

mereolog avatar Jun 30 '23 12:06 mereolog