2

I am working with jena library. When I want to open this address:

model = FileManager.get().loadModel("http://dbpedia.org/resource/Shlomo_Breznitz");

I got this exception:

http://dbpedia.org/resource/Shlomo_Breznitz(line 54 column 8): Element or attribute do not match QName production: QName::=(NCName':')?NCName.

It is a bug of jena, because this exception occurs just here (other rdf which I try to read are OK) or is there something wrong with this rdf file?

azurefrog
  • 10,785
  • 7
  • 42
  • 56
hudi
  • 15,555
  • 47
  • 142
  • 246

1 Answers1

4

This means that the data being returned from DBPedia is malformed (which is unfortunately quite common) - putting the URL into the W3C RDF/XML Validator also shows this error

The only workaround currently is to download the file and manually fix the error yourself prior to parsing it with Jena

RobV
  • 28,022
  • 11
  • 77
  • 119
  • 5
    Also, please complain on the [DBpedia mailing list](https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion) so they get their act together and fix these issues. – cygri Apr 20 '12 at 16:10