0

I am trying to load an OWL 2.0 ontology in Protege 3.5. However it is giving an error everytime I try.

The error is as follows:

Jena Parse error message: content is not allowed in prolog Exception class org.xml.sax.SAXParseExceotion: content is not allowed in prolog.

My OWL2 file has the following code

Prefix( xsd:=<http://www.w3.org/2001/XMLSchema#> )
Prefix( ns:=<http://isd.ktu.lt/semantika/> )
Ontology( <http://isd.ktu.lt/semantika/s2o>
Declaration( AnnotationProperty( <ns:s2o#label_sbvr> ) )
Declaration( AnnotationProperty( <ns:s2o#label_en> ) )
Declaration( Class( <ns:s2o#credit_card> ) )
AnnotationAssertion( <ns:s2o#label_sbvr> <ns:s2o#credit_card> "credit_card"@en )
AnnotationAssertion( <http://www.w3.org/2000/01/rdf-schema#label> <ns:s2o#credit_card> "credit card"@en )
AnnotationAssertion( <ns:s2o#label_en> <ns:s2o#credit_card> "credit card" )
Declaration( Class( <ns:s2o#car_rental> ) )
AnnotationAssertion( <ns:s2o#label_sbvr> <ns:s2o#car_rental> "car_rental"@en )
AnnotationAssertion( <http://www.w3.org/2000/01/rdf-schema#label> <ns:s2o#car_rental> "car rental"@en )
AnnotationAssertion( <ns:s2o#label_en> <ns:s2o#car_rental> "car rental" )
ClassAssertion( <ns:s2o#car_rental> <ns:s2o#myCarRental> )
Declaration( ObjectProperty( <ns:s2o#is_insured_by__credit_card> ) )
ObjectPropertyDomain( <ns:s2o#is_insured_by__credit_card> <ns:s2o#car_rental> )
ObjectPropertyRange( <ns:s2o#is_insured_by__credit_card> <ns:s2o#credit_card> )
AnnotationAssertion( <ns:s2o#label_sbvr> <ns:s2o#is_insured_by__credit_card> "car_rental is_insured_by credit_card"@en )
AnnotationAssertion( <http://www.w3.org/2000/01/rdf-schema#label> <ns:s2o#is_insured_by__credit_card> "car rental is insured by credit card"@en )
AnnotationAssertion( <ns:s2o#label_en> <ns:s2o#is_insured_by__credit_card> "car rental is insured by credit card" )
SubClassOf( <ns:s2o#car_rental> ObjectMinCardinality( 3 <ns:s2o#is_insured_by__credit_card> <ns:s2o#credit_card> ) )
SubClassOf( <ns:s2o#car_rental> ObjectMaxCardinality( 5 <ns:s2o#is_insured_by__credit_card> <ns:s2o#credit_card> ) )
)

The ontology is fine as Hermit Reasoner and Pellet Reasoner works fine on it, when I run them from a Java Code. Can you tell me why the error message is coming and how to fix it.

1 Answers1

0

Protege is trying to parse the ontology as XML, but its format is actually Functional syntax.

Protege 3.5 is ancient, and I don't know what level of support for syntaxes other than RDF/XML it has. Why are you attempting to use it? Can you move to Protege 4.3?

Ignazio
  • 10,504
  • 1
  • 14
  • 25
  • Yes I have asked my supervisor to allow installation of protege 5.0. Actually my institution requires prior approval before a software installation. Even I was suspecting the same. Cheers for supporting my doubt though. – Sayandeep Mitra Jul 03 '15 at 10:21
  • I managed to find an OWL Syntax converter http://mowl-power.cs.man.ac.uk:8080/converter/ and started working on the Protege 3.5 meanwhile. There is a major doubt which arose. I am posting a new question on that. It would be great if you could take a look into it. – Sayandeep Mitra Jul 03 '15 at 10:26