Skip to content

UnexpectedEOF when parsing example from Wikipedia page. #49

@filippodebortoli

Description

@filippodebortoli

This snippet of code:

let mut bytes = ontology.as_bytes();
let reader = horned_owl::io::owx::reader::read(&mut bytes).unwrap();

panics if I use the following example (taken from the OWL Wikipedia page):

let ontology = 
    r#"<Ontology ontologyIRI="http://example.org/tea.owl" ...>
    <Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/>
    <Declaration>
        <Class IRI="Tea"/>
    </Declaration>
    </Ontology>"#;

and returns successfully if I add the xmlns attribute to the ontology:

let ontology = 
    r#"<Ontology xmlns="http://www.w3.org/2002/07/owl#" ontologyIRI="http://example.org/tea.owl" ...>
    <Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/>
    <Declaration>
        <Class IRI="Tea"/>
    </Declaration>
    </Ontology>"#;

Is it intended behavior? I would expect the first ontology to be as well-formed as the second one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions