0

I'm trying to open an owl ontology with Protege on a CentOS 7 machine, and I receive the following error from the OWLXMLParser when I do so :

org.xml.sax.SAXParseException; systemId: file:/home/michael/workspace/SexOffenderETL/sexoffenderetl/sexo-ontology2.owl; lineNumber: 299; columnNumber: 3; XML document structures must start and end within the same entity.

I was originally using a .ttl version of this ontology, but converted it to a .owl at my team lead's recommendation. What can I do to remedy this error?

DivDiff
  • 963
  • 2
  • 10
  • 22
  • Protege tries a bunch of parsers when attempting to load a file. Even with a successful load, you'll might be able to see the errors from the parser that couldn't handle it. If it's a Turtle file, then the RDF/XML and OWL/XML parsers that might use a SAX parser will certainly throw an error. Since it's a Turtle file, please show the error from the Turtle/N3 parser. Otherwise we can't really help. It will also help if you can post your ontology. – Joshua Taylor Nov 21 '14 at 03:52
  • Ok. Here's the error: org.xml.sax.SAXParseException; systemId: file:/path/to/file.ttl; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog. – DivDiff Nov 21 '14 at 13:07
  • That's the same error that you posted in the question, and it's still the SAXParseException. Please post the error from the Turtle parser. Protege has a bunch of parsers, and when you load a file, it tries them all, hoping that one will succeed. It makes sense that the others fail. Also, use the **edit** button below your question to add new information to the question. Posting it in the comments means that fewer people will see it, and comments can be deleted without history, so it might not stay around forever. – Joshua Taylor Nov 21 '14 at 13:30

2 Answers2

0

The SAX error you report mentions mismatched tags. This seems to indicate the XML is syntactically incorrect.

Is the XML available online for us to check? If not, you'll need to verifying the XML syntax with some XML tools on your local machine.

Ignazio
  • 10,504
  • 1
  • 14
  • 25
0

The reason for this error is you made a mistake when designing your ontology,epecially dot (.) And othe symbols lead to this error.so, It can be corrected easily by viewing the Line number that displayed in the the dialog box menu Owl /turtle parser. Then open your ontology file in Notepad++ to locate the line number and check your sytax in that line number.

Mulualem M
  • 51
  • 1
  • 1
  • 6