rdf-ext / rdf-parser-csvw

CSV on the Web parser
MIT License
16 stars 4 forks source link

Relative IRI for csvw:url property #28

Closed ktk closed 3 years ago

ktk commented 3 years ago

This line:

https://github.com/rdf-ext/rdf-parser-csvw/blob/53ce4665cfa8eb90e73467e21f20bf1e80f9a575/lib/ObjectParserTransform.js#L115

Generates triples like:

_:b86 <http://www.w3.org/ns/csvw#url> <#row=41> .

which are not valid IRIs (relative). What is this.baseIRI in this context? Apparently it is not set to what is expected (as in empty) so this should be catched here in case this happens.

If I override the string to 'file:///#row=' manually I get triples that are valid.

ktk commented 3 years ago

I just noticed I get an empty csvw:url for the metadata in the beginning as well:

_:b45 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/csvw#TableGroup> .
_:b45 <http://www.w3.org/ns/csvw#table> _:b46 .
_:b46 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/csvw#Table> .
_:b46 <http://www.w3.org/ns/csvw#url> <> .
ktk commented 3 years ago

Closing here, not forwarded in barnard59, see issue above.