#278 save assertion to rdf where property has two colons fails

3.4.5
closed-wont-fix
None
5
2013-09-21
2011-06-21
No

The emo ontology has several iri's that have two colons. Inside the emo ontology there is an object property assertion axiom where the property has two colons. To write this out to rdf, the owlapi tries to start an element with the property name and finds that it doesn't know how to do this.

Discussion

  • Timothy Redmond

    Timothy Redmond - 2011-06-21

    the ontology that cannot be loaded and saved

     
  • Timothy Redmond

    Timothy Redmond - 2011-06-21

    the exception that is caused

     
  • Timothy Redmond

    Timothy Redmond - 2011-06-21

    a program that demonstrates the problem

     
  • Ignazio Palmisano

    Uhm I see... as far as I can tell, an IRI like the one in the exception message does not have an NCName at all: the second colon is the last character not allowed in an NCName and after that there are only digits, i.e., no good starts for the NCName. The URI specs are not placing limits on the allowed characters on a fragment, although colons are reserved elsewhere. Escaping is a possibility, but I believe it's not good here. I believe this requires the triples to be written without the IRI to XML Element shortcut and in the ugly RDF/XML format that goes:
    <Description rdf:about="....EMO:33344455">...
    but these IRIs are not necessarily found before output is produced. I'm not sure what the parser behavior is supposed to be, if a file mixes together RDF/XML and RDF/XML-ABBREV, so a preprocessing of the IRIs that appear in the ontology should be needed in order to choose which format is adequate.
    Before I try implementing this, does this sound like a solution?

     
  • Ignazio Palmisano

    • assigned_to: nobody --> ignazio1977
     
  • Timothy Redmond

    Timothy Redmond - 2011-06-22

    It is a pity that RDF is so hard to work with. I think that your fix is fine. I have never felt that the RDF really needs to be pretty. Also this case is a bit of a borderline case (it is the only ontology I have found that does this) so maybe people generally won't notice.

     
  • Ignazio Palmisano

    I wonder what's the american expression for "you're not half wrong". I keep thinking linking RDF so closely with XML, not to mention fancy "nice looking" element names and the likes, was a big mistake when the specs were designed. That, and blank nodes filling all sorts of roles (not just in RDF).

    Obviously there must have been plenty of reasons that I'm ignorant of for doing things the way they've been done <defuse_bomb/>

    More seriously, I need to check how hard it is to check IRIs are amenable to NCNaming before starting any output. If that's a big performance hit, we'll have another nice mess on our hands.

     
  • Ignazio Palmisano

    My proposed solution won't work, as the RDF renderer needs ncnames for rendering property arcs. I cannot see a way to do so in standard RDF, as property elements do not appear to allow for an analogue of the node element syntax rdf:Description rdf:about="...".
    I'm afraid this limitations cannot be removed for the RDF/XML format.

     
  • Ignazio Palmisano

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,2 +1 @@
    -
     The emo ontology has several iri's that have two colons.  Inside the emo ontology there is an object property assertion axiom where the property has two colons.  To write this out to rdf, the owlapi tries to start an element with the property name and finds that it doesn't know how to do this.
    
    • status: open --> closed-wont-fix
    • Group: --> 3.4.5
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks