phillord/horned-owl

Broken test files still pass

phillord opened this issue · 2 comments

I have modified "class.owx" to contain this obvious breakage.

   <Prefix name="rdfs" IRI="http://www.w3.org/2000/01/rdf-schema#"/>
    
    I am broken


    <Declaration>
        <Class IRI="#C"/>
    </Declaration>

But, obvious as it is, the tests all seem to pass and I do not know why.

By looking at io::ows::reader::read_with_build it becomes clearer that anything that is not a opening/closing or an empty tag is simply not handled, via the case _ => {} (code here).

This means that the text "I am broken" you inserted is just filtered away while parsing, as of now.

Ah, that is good to know, since I may need to break an ontology again (as I did when I discovered this). I will think on it. In some ways the behaviour is nice (i.e. it still works) but in others bad. Horned does not have a generic mechanism for logging or reactiing to this sort of partial error.