linkeddata / rdflib.js

Linked Data API for JavaScript
http://linkeddata.github.io/rdflib.js/doc/
Other
565 stars 143 forks source link

changing uncommon prefixes to common #474

Closed TallTed closed 3 years ago

TallTed commented 3 years ago

e.g., XML: -> xsd: <http://www.w3.org/2001/XMLSchema#> e.g., n: -> org: <http://rdfs.org/sioc/ns#> e.g., n0: -> dc: <http://purl.org/dc/elements/1.1/>

(partly?) fixes #472

angelo-v commented 3 years ago

I think the PR is fine. The switch to dcterms should probably be done in a seperate issue/PR. But there is a failing test. Can you fix this @TallTed, then we can merge it, imho

TallTed commented 3 years ago

@angelo-v -- The failing tests appear to be comparisons between dynamically generated RDF (which now uses xsd:), and some static file(s) (which still use XML:) against which that dynamically generated RDF is being checked. Github is not revealing to me what/where the static file(s) is/are, so I cannot change them to match the new dynamically generated data.

angelo-v commented 3 years ago

@TallTed There are not so many places left that use XML:, so you proably find them here: https://github.com/linkeddata/rdflib.js/search?l=Turtle&q=%22XML:%22

angelo-v commented 3 years ago

Ah sorry, no I understood it wrong. So you actually adjusted only static ttl files so far and no turtle generation, yet. So basically you only changed the test expectations, but did not change the way rdflib generates preefixes.

TallTed commented 3 years ago

Ah, my bad. I keep expecting Github to search more than it does. And it only alerts that "forked repositories are not currently searchable" if I select "Code" for the search. But it does find a manageable 16 hits in "Commits" on the parent branch. I'll give it another whack.

TallTed commented 3 years ago

@angelo-v, others...

I'm at a loss. Github searches brought no joy, so I downloaded my fork, and tried grepping through it locally. I can't find anything that looks like it's associating XML with the XMLSchema URL, nor doing the other odd prefix settings. So I guess this will languish until someone gets tired of seeing this PR in the list, and goes and finds where the odd prefixes are being set.

angelo-v commented 3 years ago

I am afraid rdflib just generates the prefixes based on the URL and does not have any configuration for common prefixes to use. I don't think it is of any help to leave this PR open, since it only adjusts test data. To keep track of the task we still have the issue https://github.com/linkeddata/rdflib.js/issues/472