pyvandenbussche / lov

Linked Open Vocabularies (LOV) - FrontEnd
http://lov.okfn.org/dataset/lov/
60 stars 12 forks source link

Suggest RDF/XML (text/xml) vocab fails #64

Closed white-gecko closed 6 years ago

white-gecko commented 8 years ago

I wanted to suggest http://topbraid.org/diff# as vocabulary at http://lov.okfn.org/dataset/lov/suggest but it fails with:

org.apache.jena.riot.RiotException: Failed to determine the triples content type: (URI=file:///usr/local/lov/lovnode/http://topbraid.org/diff# : stream=text/xml : hint=null) at 
org.apache.jena.riot.RDFDataMgr.process(RDFDataMgr.java:755) at 
org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:652) at 
org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:211) at 
org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:104) at 
org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:95) at 
org.apache.jena.riot.RDFDataMgr.loadModel(RDFDataMgr.java:331) at 
org.lov.LovBotVocabAnalyser.analyse(LovBotVocabAnalyser.java:58) at 
org.lov.LovBotVocabAnalyser.analyseVocabURI(LovBotVocabAnalyser.java:48) at 
org.lov.cli.Suggest.exec(Suggest.java:71) at arq.cmdline.CmdMain.mainMethod(CmdMain.java:101) at 
arq.cmdline.CmdMain.mainRun(CmdMain.java:63) at 
arq.cmdline.CmdMain.mainRun(CmdMain.java:50) at org.lov.cli.Suggest.main(Suggest.java:27)

actually the delivered content type is not application/rdf+xml as it should be, but text/xml:

$ curl -I http://topbraid.org/diff\#
HTTP/1.1 200 OK
Date: Thu, 30 Jun 2016 09:21:45 GMT
Server: Apache/2.2.15 (SuSE)
Last-Modified: Wed, 18 Nov 2015 16:39:56 GMT
ETag: "1061d5a-a294-524d34adfc470"
Accept-Ranges: bytes
Content-Length: 41620
Connection: close
Content-Type: text/xml

but since in this context it should be clear that text/xml might be application/rdf+xml I suggest to also accept this content type and try to pars it as RDF/XML.

gatemezing commented 7 years ago

@white-gecko You can use Vapour http://linkeddata.uriburner.com:8000/ to check the content of your vocabulary. LOV uses what is currently considered as Best Practices. You might also find some useful recipes for conneg at https://www.w3.org/TR/swbp-vocab-pub/. HTH