buda-base / lds-pdi

http://purl.bdrc.io BDRC Linked Data Server
Apache License 2.0
2 stars 0 forks source link

owl ontology serialization uses relative instead of absolute refs #135

Closed xristy closed 5 years ago

xristy commented 5 years ago

When serializing the ontology as owl:

curl GET "http://purl.bdrc.io/ontology/admin.owl"

The references in rdf:about are relative instead of absolute which leads to incorrect parsing by some tools. For example:

  <owl:Ontology rdf:about="types/PaginationType/">
      <owl:versionInfo>Created with TopBraid Composer</owl:versionInfo>
      <owl:imports rdf:resource="http://www.w3.org/2004/02/skos/core"/>
  </owl:Ontology>

and

  <owl:Class rdf:about="core/Place">
    <rdfs:subClassOf>
      <owl:Class rdf:about="core/Entity"/>
    </rdfs:subClassOf>
    <rdfs:label xml:lang="en">Place</rdfs:label>
    <rdfs:comment xml:lang="en">Places are geographic entities ranging from monasteries, to villages, to counties, provinces and so on. Places are modeled in terms of subclasses that indicate the type of "real world" place that is referred to</rdfs:comment>
    <rdfs:comment xml:lang="en">Names are represented by rdfs:label</rdfs:comment>
  </owl:Class>

The turtle serialization is fine as it uses defined prefixes producing absolute URI's

eroux commented 5 years ago

I think a bigger problem is that the base url is declared as:

xml:base="http://purl.bdrc.io/ontology/admin"

so

<owl:Class rdf:about="core/Place">

expands to

<owl:Class rdf:about="http://purl.bdrc.io/ontology/admincore/Place">

which is very weird...

xristy commented 5 years ago

The admin.ttl starts with:

# baseURI: http://purl.bdrc.io/ontology/admin/
# imports: http://purl.bdrc.io/ontology/adm/ContentProvider/
# imports: http://purl.bdrc.io/ontology/adm/LegalData/
# imports: http://purl.bdrc.io/ontology/adm/types/Access/
# imports: http://purl.bdrc.io/ontology/adm/types/GitRepo/
# imports: http://purl.bdrc.io/ontology/adm/types/License/
# imports: http://purl.bdrc.io/ontology/adm/types/OutlineType/
# imports: http://purl.bdrc.io/ontology/adm/types/Status/
# imports: http://purl.bdrc.io/ontology/adm/types/TermsOfUse/
# imports: http://purl.bdrc.io/ontology/core/
# prefix: adm

@prefix adm: <http://purl.bdrc.io/ontology/admin/> .
@prefix bda: <http://purl.bdrc.io/admindata/> .
@prefix bdd: <http://purl.bdrc.io/data/> .
@prefix bdg: <http://purl.bdrc.io/graph/> .
@prefix bdo: <http://purl.bdrc.io/ontology/core/> .
@prefix bdr: <http://purl.bdrc.io/resource/> .
@prefix bf: <http://id.loc.gov/ontologies/bibframe/> .
@prefix cc: <http://creativecommons.org/ns#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix iiif2: <http://iiif.io/api/presentation/2#> .
@prefix iiif3: <http://iiif.io/api/presentation/3#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

adm:
  a owl:Ontology ;
  rdfs:comment "This is the buda admin ontology comprising classes, and properties with domains and ranges that add administrative items for use in the Buda platform"@en ;
  rdfs:label "Buda admin ontology"@en ;
  owl:imports <http://purl.bdrc.io/ontology/adm/ContentProvider/> ;
  owl:imports <http://purl.bdrc.io/ontology/adm/LegalData/> ;
  owl:imports <http://purl.bdrc.io/ontology/adm/types/Access/> ;
  owl:imports <http://purl.bdrc.io/ontology/adm/types/GitRepo/> ;
  owl:imports <http://purl.bdrc.io/ontology/adm/types/License/> ;
  owl:imports <http://purl.bdrc.io/ontology/adm/types/OutlineType/> ;
  owl:imports <http://purl.bdrc.io/ontology/adm/types/Status/> ;
  owl:imports <http://purl.bdrc.io/ontology/adm/types/TermsOfUse/> ;
  owl:imports bdo: ;
.

So it's not clear how the trailing / is being lost from the xml:base.

I also notice some bdo: chaff in the admin.ttl that I need to take care of

eroux commented 5 years ago

(linked to https://github.com/buda-base/lds-pdi/issues/119 )

MarcAgate commented 5 years ago

I believe this one is fixed (as well as #119)

eroux commented 5 years ago

looks ok yes thanks