Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to set a namespace prefix in serializer #536

Open
pduchesne opened this issue Dec 15, 2021 · 6 comments
Open

Impossible to set a namespace prefix in serializer #536

pduchesne opened this issue Dec 15, 2021 · 6 comments
Assignees

Comments

@pduchesne
Copy link
Contributor

It is not possible to set namespace prefixes in the serializer; only to suggest them, meaning they cannot override the default prefixes.

As a generic RDF lib, it should be possible to forcefully set any namespace prefix.

As a concrete example, I have a usecase where the schema.org URIs are expressed in the HTTPS scheme. The default schema prefix targets http://schema.org . I cannot redefine it.

@pduchesne
Copy link
Contributor Author

Here's a PR for this : #534

@TallTed
Copy link
Contributor

TallTed commented Dec 15, 2021

Note that the default prefix now targets http://schema.org/ (note terminating slash), not http://schema.org, and the new target you want for them should be https://schema.org/ (again, terminating slash). I cannot make substantive comment on the PR.

@pduchesne
Copy link
Contributor Author

Indeed, typo on my part.

@bourgeoa
Copy link
Contributor

@timbl does seem a good idea.

@jeff-zucker
Copy link
Contributor

@timbl Related issue : solid-ui demands http://www.w3.org/ns/ui and will fail with https.

@timbl
Copy link
Member

timbl commented Feb 24, 2022

Well the policy in Solid has so far to leave all the historical namespaces at http://www.w3.org/ and Dublin Core etc http: space, and just to actually fetch the ontology from https: space, either by being redirected at fetch time, or by having code which just adds the s before the fetch for any ontology. This has worked fine, and all the RDF terms match correctly. Yes, in RDF if you add an 's' to the identifier then it is a different thing and won't work. So don't! :-)

The same had applied to schema.org .

But now schema.org is changing its human-readable documentation at least to use https . This breaks everything, as it fills the world with a mixture of the two, which will break code and query and data. We need to decide what to do. For example,

  • Persuade the schema.org folks to go back to using http: uniquely
  • Persuade them to switch to using https: consistently and add special-case conversion of old data
  • Decide we will violate RDF's tradition of not looking at URIs and build systems which treat the two as the same, for schema.org and anything else. Canonicalize and 'https:identifier to be alwayshttp(or alwayshttps` ).

rdflib already has some canonicalization code, for example when one uri is redirected 'moved' to another, just using the second.

If we added the ability to switch out old versions of terms for new ones, them also we could use it for moving between old and new ontologies: when you patched a file, the server could switch out the old terms in it. Could be useful. But RDF purists would maybe not like it at all, and systems which did not canonicalize internally would have to be protected by having canonicalizing adapters upstream of them.

Need to move this to a different issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Review
Development

No branches or pull requests

5 participants