RalphTro / epcis-event-hash-generator

ALGORITHM and SOFTWARE PROTOTYPE to uniquely identify/validate the integrity of any EPCIS event through a common, syntax-agnostic approach based on hashing. Takes an EPCIS Document (formatted in either XML or JSON-LD) and returns the corresponding hash value(s).
MIT License
8 stars 4 forks source link

Bare string normalisation #76

Closed Echsecutor closed 1 year ago

Echsecutor commented 1 year ago
Echsecutor commented 1 year ago

@RalphTro can you have a quick glance at my changes regarding the test example files and the expected pre-hash strings?

RalphTro commented 1 year ago

Dear @Echsecutor , Thanks a lot! The logic as such seems to work fine. There is only one thing I came across: the namespace of the CBV Web URI terms. E.g., instead of https://ns.gs1.org/voc/Bizstep-departing, the algorithm should have normalised it to https://ref.gs1.org/cbv/BizStep-departing I hope a simple replacement will fix this issue (https://ns.gs1.org/voc/ --> https://ref.gs1.org/cbv/). Many thanks in advance and kind regards, Ralph

RalphTro commented 1 year ago

FYI: see also https://github.com/RalphTro/epcis-event-hash-generator/issues/77 - I found a file with which the algorithm has a problem to properly expand bare strings to their corresponding full URI + in which the the eventType is appended at an unexpected position. Hope this helps?! Many thanks in advance!

Echsecutor commented 1 year ago

Dear @Echsecutor , Thanks a lot! The logic as such seems to work fine. There is only one thing I came across: the namespace of the CBV Web URI terms. E.g., instead of https://ns.gs1.org/voc/Bizstep-departing, the algorithm should have normalised it to https://ref.gs1.org/cbv/BizStep-departing I hope a simple replacement will fix this issue (https://ns.gs1.org/voc/ --> https://ref.gs1.org/cbv/). Many thanks in advance and kind regards, Ralph

I think the version in this branch should produce https://ref.gs1.org/ namespaces everywhere. If you found a counter example, please let me know!