sesame-vocab-builder
sesame-vocab-builder copied to clipboard
Using FOAF vocabulary throws parse exception
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).
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.
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.
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.
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.