On 14/11/13 20:55, Nogales Moyano Alberto wrote:
Dear all I am working with various ontologies some of them are in
.owl  and other .rdf. I have no problem with .owl files but when
>  I try to load .rdf file I have errors. Here is my code for .owl,
maybe the problems is with the model.
OntModel model = ModelFactory.createOntologyModel();


model.read("/ont/Indiana.rdf", "RDF/XML");
Query query = QueryFactory.create(SPARQLquery);

The error is:

Exception in thread "main" org.apache.jena.riot.RiotException: Element or 
attribute do not match QName production: QName::=(NCName':')?NCName.
at 
org.apache.jena.riot.system.ErrorHandlerFactory$ErrorHandlerStd.fatal(ErrorHandlerFactory.java:136)

There should be more of stacktrace than this.

It looks like there a problem in the data - the error is an XML error. The RDf/XML parser is correctly invoked but somewhere in your data there is illegal XML. A tag does not match the XML rules of <name:name>.

        Andy

Reply via email to