acdh-oeaw / vocabseditor

Vocabseditor is a web-based tool for collaborative work on controlled vocabularies development
https://vocabseditor.acdh.oeaw.ac.at/
MIT License
23 stars 6 forks source link

Concept URIs without hash-character #49

Closed KlausIllmayer closed 2 years ago

KlausIllmayer commented 2 years ago

Currently, the automatic created concept URIs without a legacy-id are built up using a #-character as separator: {base-uri}#concept{id}. This leads to problems with webserver redirect rules, as # is used for an anchor and therefore redirect rules are ignoring the # and all stuff behind it. Besides, it could also lead to problems, if on the resolving side anchors are used, because it will not allow it anymore (something like {base-uri}#concept{id}#{anchor-id} will break and not jump to the anchor).

It seems to be better to change the behviour of creating the automatic concept URIs and don't use the # anymore. Instead I propose to replace it with / and I also think that is is better readable if it also separates the concept. The schema would then look like {base-uri}/concept/{id}.

If changing to this new schema we need to be aware, that ConceptSchemes using the old schema shouldn't change to the new schema. One solution would be to use for such old vocabularies the legacy-id-field and add there the uri based on the old schema. This means that before switching to the new schema, all concepts that do not have a legacy-id-field should get a legacy-id with the old schema. Does this sound feasible or is there another option possible (maybe the date of creation defines the schema in use or maybe a configuration field to chose if it should use the old/new schema?).

KlausIllmayer commented 2 years ago

Connected with #2

csae8092 commented 2 years ago

I'd prefer a hard solution -> replace '#' with '/' I'd make this a configuration parameter "CONCEPT_SEPARATORS" with default '/' on application level after all, if someone is not happy with it, its a simple search&replace to change it back

KlausIllmayer commented 2 years ago

so you mean {base-uri}/concept{id}? yes, i'm fine with it