sesame-vocab-builder icon indicating copy to clipboard operation
sesame-vocab-builder copied to clipboard

Using FOAF vocabulary throws parse exception

Open tkurz opened this issue 10 years ago • 4 comments

Using http://xmlns.com/foaf/spec/index.rdf throws a parser excepiton (line1,char1). @ansell Does Sesame has problems with leading comments (the foaf file starts with comment).

tkurz avatar Nov 05 '14 15:11 tkurz

I will look into it. I haven't seen an XML file that starts with comments before, from memory, but I will need to check if it is valid.

The current Sesame version transparently handles BOM markers, so it isn't likely to be that unless we are using an older Sesame version.

ansell avatar Nov 05 '14 19:11 ansell

Looking at the specs, it appears that the document should be valid, as it doesn't have the xml PI, which would otherwise need to be first.

Will look further into the Sesame code later today.

ansell avatar Nov 05 '14 20:11 ansell

Quick test reveals that comments at the start of an RDF/XML document can be processed by Sesame, so it may have something to do with the actual document:

https://bitbucket.org/openrdf/sesame/commits/64c53a5a6b63393b2601c890a56ab342f9047259

I also checked with a hex editor and it doesn't seem to start with a BOM so that doesn't seem to be the issue either.

ansell avatar Nov 05 '14 22:11 ansell

If I save the file using "wget http://xmlns.com/foaf/spec/index.rdf" and then run "./sesame-vocab-builder index.rdf -n FOAF" it succeeds, so possibly something related to the way we are fetching documents.

ansell avatar Nov 05 '14 22:11 ansell