Namespace binding related regressions

24 views
Skip to first unread message

Iwan Aucamp

unread,
Mar 20, 2023, 3:10:47 PM3/20/23
to rdflib-dev
Hi,

Writing this just to inform everyone of some potentially conterversial-to-fix regressions.

The following yet unaddressed regressions were introduced with Bind prefixes choices #1686 that was first released in 6.2.0:
  • The namespaces bound by default for Graphs is very different than in was in 6.1.1 [#2103]
  • The unreleased binding of the wgs prefix was dropped [#2196].
  • The prefix for `https://schema.org` was changed from `schema` to `sdo` [#2294]

The `wgs` issue is fairly uncontroversial I think, I will just add it back, but the others are a bit controversial.

Changing the default bound namespaces breaks code that worked with 6.1.1. Now it has been some time since 6.2.0, so likely people have got over it, but it is still a regression, and technically the right thing to do will be to fix it, though given how much time has passed that will likely just make everyone upset again from scratch.

Fixing the change to the `https://schema.org` prefix binding is also controversial I think, but probably less so, I'm sure if we fix it we will break some existing code out there. It would maybe be okay to bind it twice, (i.e. bind `sdo` and `schema` for `https://schema.org`) but another regression broke the ability to do this.

I would really appreciate any input here. I'm going to merge a PR that adds `wgs` back, but for the default bindings and the change in `schema` prefix I'm going to just treat them as wonfix unless there is some feedback from the community.

Regards
Iwan Aucamp

Wes Turner

unread,
Mar 20, 2023, 3:56:39 PM3/20/23
to rdfli...@googlegroups.com
All of these have `schema` as the QName, so IMO "`sdo:` is a new optional alias for `schema:`" would have been the non-breaking change:

- "RDFa Core Initial Context, JSON-LD Recommended Context"



--
http://github.com/RDFLib
---
You received this message because you are subscribed to the Google Groups "rdflib-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rdflib-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rdflib-dev/dac7d60c-6f26-4a9d-961d-950348659250n%40googlegroups.com.

Nicholas Car

unread,
Mar 20, 2023, 6:15:56 PM3/20/23
to rdfli...@googlegroups.com
I'm happy for wgs to be added back in and also happy for schema to be added. If both schema and sdo can co-exist then great.

There was, I think, some push-back on the idea of binding more prefixes by default, but I don't see the problem, as I've outlined here: https://github.com/RDFLib/rdflib/issues/2103#issuecomment-1477005612

I think we should err on the side of making things work "out of the box" and if there are prefixes people don't like, they can re-bind them. Most of the prefixes listed in the "rdflib" set are pretty un-controversial but the set can never be perfect for everyone!

Nick
------- Original Message -------

Wes Turner

unread,
Mar 21, 2023, 9:00:38 AM3/21/23
to rdfli...@googlegroups.com
Perhaps the stated policy on namespace bindings - maybe in comments at the top of the file - should be?:

- Do not break namespace bindings that are specified in a major or minor release.

- First, copy the W3C RDFa/JSON-LD Recommended Context namespace bindings

- Justify additional custom namespace bindings in a PR

- As necessary, always specify the complete list of namespace bindings for your RDF document, or use the RDFa/JSONLD default context.

Miel Vander Sande

unread,
Mar 22, 2023, 8:38:52 AM3/22/23
to rdfli...@googlegroups.com
As somebody recently ran into issue wrt to default namespaces, I second the policy Wes proposes. 

I'm not a big fan of binding namespaces by default because of the lack of transparency, but that ship has sailed.  
The ability to have prefix aliases would be very nice, but tricky wrt to serialising. I would prefer an easy rebinding method or some sort (if not already present). 

Best,

Miel

Op di 21 mrt 2023 om 14:00 schreef Wes Turner <wes.t...@gmail.com>:

Iwan Aucamp

unread,
Mar 24, 2023, 5:37:16 PM3/24/23
to rdflib-dev
Given the feedback, I will do the following for 6.3.2:

  • Change the prefix for `https://schema.org` from `sdo` to `schema`
  • Change the default bindings from `core` to `rdflib`, which is the same behaviour as in 6.1.1
  • Add a docstring with recommendations from Wes.

Nicholas Car

unread,
Mar 24, 2023, 6:43:02 PM3/24/23
to rdfli...@googlegroups.com
Sounds good Iwan!

I will try and conduct a review of the elements of the DefinedNamespace classes referenced in the “rdflib” binding to make sure they are up to date. Yes, some namespaces do change e.g. GeoSPARQL which is about to get new elements through a new version publication.

Nick
Reply all
Reply to author
Forward
0 new messages