Closed KDean-Dolphin closed 3 months ago
The "?" flag relates to AIs that are valid data attributes corresponding to the AIs defined in §4.10 "Data attributes" of the grammar.
My understanding is that the text is for the most part "mere commentary", with the rule specifying the intent. I don't believe that it is the intent of the quoted text to say that supplementary to the ABNF rules any key or potential key-qualifier is also a valid data attribute, only that it may be the case for some AIs such as (10).
If it becomes valid to include any of those AIs as data attributes in the future, i.e. they get tokens assigned in §4.10, then we can certainly reintroduce the flag.
That's reasonable.
Having reviewed the GS1 DL URI specification we have a block:
gtinParameter = "gtin-code=" gtin-value itipParameter = "itip-code=" itip-value gmnParameter = "gmn-code=" gmn-value cpidParameter = "cpid-code=" cpid-value glnParameter = "gln-code=" gln-value payToParameter = "payTo-code=" payTo-value partyGlnParameter = "partyGln-code=" partyGln-value gsrnpParameter = "gsrnp-code=" gsrnp-value gsrnParameter = "gsrn-code=" gsrn-value gcnParameter = "gcn-code=" gcn-value ssccParameter = "sscc-code=" sscc-value gdtiParameter = "gdti-code=" gdti-value gincParameter = "ginc-code=" ginc-value gsinParameter = "gsin-code=" gsin-value graiParameter = "grai-code=" "0" grai-value giaiParameter = "giai-code=" giai-value
Which should likely be:
gtinParameter = gtin-code "=" gtin-value ...
Having noted this, I've reverted the trimming of the "?" flag on the corresponding AIs: https://github.com/gs1/gs1-syntax-dictionary/commit/9965ea27ba4a49ecbd16a83d7cb2621b241ae9aa
This is required in order to allow the Syntax Engine unit tests that are based on DL URI spec examples to pass.
... Which should likely be:
gtinParameter = gtin-code "=" gtin-value ...
We are in agreement that the GS1 DL URI spec should be updated. Issue captured elsewhere.
After further discussion with @mgh128 and in light of his comment on the original issue, I think we should put back the "GS1 Digital Link attribute" flag on all primary keys.
Section 4.10 of the GS1 Digital Link Standard: URI Syntax includes the following (emphasis mine):
This too is not entirely correct; the first sentence should read, "Note that ‘data attributes’ MAY include AIs that may also be used as primary or secondary keys...".
Reviewing the syntax dictionary yet again, I find that the secondary keys for AI 01 have the flag set for AI 10 but not for 21, 22, and 235. We should put the flag back on all primary and secondary keys, and do a thorough review to ensure that the flag is correctly set or unset for all AIs.