diff --git a/pronto/parsers/rdfxml.py b/pronto/parsers/rdfxml.py index 4ea7219..2667c2f 100644 --- a/pronto/parsers/rdfxml.py +++ b/pronto/parsers/rdfxml.py @@ -173,7 +173,7 @@ def _compact_id(self, iri: str) -> str: match = re.match(f"^http://purl.obolibrary.org/obo/{id_}#(.*)$", iri) if match is not None: return match.group(1) - return iri + return iri def _compact_datatype(self, iri: str) -> str: match = re.match("^http://www.w3.org/2001/XMLSchema#(.*)$", iri) @@ -182,6 +182,9 @@ def _compact_datatype(self, iri: str) -> str: match = re.match("^http://www.w3.org/2000/01/rdf-schema#(.*)$", iri) if match is not None: return f"rdfs:{match.group(1)}" + match = re.match("^http://www.w3.org/1999/02/22-rdf-syntax-ns#(.*)", iri) + if match is not None: + return f"rdf:{match.group(1)}" raise iri def _extract_term_relationship(