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

fixes needed to XML/WithFullCombinationOfFields #335

Closed
VladimirAlexiev opened this issue Sep 14, 2021 · 8 comments
Closed

fixes needed to XML/WithFullCombinationOfFields #335

VladimirAlexiev opened this issue Sep 14, 2021 · 8 comments

Comments

@VladimirAlexiev
Copy link
Contributor

@sboeckelmann @dakbhavesh
I converted XML/WithFullCombinationOfFields to JSON using your tool and then had to make the following fixes (you can see most of them in VladimirAlexiev/EPCIS@47ad328):

  • remove prefix "cbvmda": "urn:epcglobal:cbv:mda" since it's declared in the EPCIS context and I get error "protected term redefinition"
  • redefine "ext1": "http://ext.com/ext1/" to have a trailing slash (same for ext2, ext3) since namespaces should end at a reasonable delimiter
  • change "someFurtherMetadata" to "ext1:someFurtherMetadata" because that's not a valid EPCIS field

Similarly in Example-TransactionEvent-2020_07_03y.xml:

  • redefine xmlns:rail="urn:gs1:epcisapp:rail:" to have a trailing colon.
  • (I also added a reasonable nested context but you can't do that in XML)
  "@context": [
    "https://gs1.github.io/EPCIS/epcis-context-simple.jsonld",
    {"rail": "urn:gs1:epcisapp:rail:",
     "rail:vehicleMasterGIAI": {"@type": "@id"},
     "rail:trainAxleCount": {"@type": "xsd:integer"},
     "rail:vehicleAxleCount": {"@type": "xsd:integer"},
     "rail:vehiclePosition": {"@type": "xsd:integer"},
     "rail:vehicleUniquelyIdentified": {"@type": "xsd:boolean"}
    }
  ]

Please make them in the XML. Thanks!
(And quickly close this issue lest Craig slaps us :-)

@CraigRe
Copy link
Collaborator

CraigRe commented Sep 14, 2021

@sboeckelmann , @dakbhavesh , @VladimirAlexiev ,

  • I added a trailing slash to ext1, ext2, ext3
  • all instances of "someFurtherMetadata" already appeared to be "ext1:someFurtherMetadata"
  • not sure why "cbvmda": "urn:epcglobal:cbv:mda" (which does not appear any most of those files) should be causing these files to fail validation...

@CraigRe CraigRe closed this as completed Sep 14, 2021
@VladimirAlexiev
Copy link
Contributor Author

VladimirAlexiev commented Sep 16, 2021

all instances of "someFurtherMetadata" already appeared to be "ext1:someFurtherMetadata"

This is #276 issue4

not sure why "cbvmda": "urn:epcglobal:cbv:mda" (which does not appear any most of those files) should be causing these files to fail validation...

Because cbvmda is included in the context and the context says @protectd: true, so no other context can redefine that term, even if it defines it to the same namespace.

Since EPCIS JSON doesn't carry MasterData, I think we should remove this prefix from the context.
@CraigRe @dakbhavesh @mgh128 do you agree?
The ilms field is supposed to carry gs1: Voc properties, not cbvmda: properties, right?

@CraigRe
Copy link
Collaborator

CraigRe commented Sep 16, 2021

@VladimirAlexiev up to now, EPCIS 1.x ILMD fields carry cbvmda properties.
Even if we were allow EPCIS 2.0 ILMD fields to carry gs1: properties, we'll still need to support/allow cbvmda properties, to ensure backward compatibility with EPCIS 1.x implementations (and EPCIS Documents captured in those deployments).

@CraigRe CraigRe reopened this Sep 16, 2021
@VladimirAlexiev
Copy link
Contributor Author

I've seen cbvmda describing GLNs and the like (using cryptic names like ssa, sst).
I now grepped "ilmd" and found several that use example:bestBeforeDate, and just one with
"cbvmda:lotNumber": "LOTABC"

@CraigRe

  • Can you point to more examples carrying cbvmda ILMD? Let's include them in the suite.
  • Is cbvmda defined at some website like gs1 Voc is? I'll include such link in the READMEs

"cbvmda" does not appear any most of those files

Yes, but it appeared in a few XML that had some example master data.
You can close this issue, since your comment shows the XML fix is correct.

@CraigRe
Copy link
Collaborator

CraigRe commented Sep 16, 2021

@VladimirAlexiev those two examples (bestBeforeDate, lotNumber) are most common, in the DSCSA (Pharma) context.
There is no online / linked data definition of cbvma.

@VladimirAlexiev
Copy link
Contributor Author

  • @sboeckelmann @dakbhavesh fixes needed: gs1:MT-Humidity is not valid anymore, should be gs1:Humidity or just Humidity (not sure which one). Appears in the following files (shown with count):
grep -c '"gs1:' */*.xml|grep -v :0
AssociationEvent/AssociationEventExamples.xml:1
Mimasu/Example-associatonEvent-sensor.xml:1
WithEventHashID/event_with_identical_hash_id_1.xml:1
WithEventHashID/event_with_identical_hash_id_2.xml:1
WithEventHashID/event_with_identical_hash_id_3.xml:1
WithEventHashID/event_with_identical_hash_id_4.xml:1
WithEventHashID/event_with_identical_hash_id_5.xml:1
WithEventHashID/event_with_identical_hash_id_6.xml:1
WithExtension/TransactionEvent.xml:1
WithExtension/TransformationEvent.xml:1
WithFullCombinationOfFields/aggregation_event_all_possible_fields.xml:1
WithFullCombinationOfFields/association_event_all_possible_fields.xml:1
WithFullCombinationOfFields/object_event_all_possible_fields.xml:1
WithFullCombinationOfFields/transaction_event_all_possible_fields.xml:1
WithFullCombinationOfFields/transformation_event_all_possible_fields.xml:1
WithSensorData/SensorDataExamples.xml:46
  • @CraigRe @RalphTro @sboeckelmann @dakbhavesh @mgh128 With the current definition, cbvmda:lotNumber is expanded to urn:epcglobal:cbv:mdalotNumber, and "mdalotNumber" is not a word. So I propose to add trailing colon to the namespace: urn:epcglobal:cbv:mda:. Fixes needed:
    • in JSONLD context
    • in XML:
grep -c 'cbvmda' *.xml */*.xml|grep -v :0
Example-PersistentDisposition.xml:1
WithExtension/TransformationEvent.xml:2
WithFullCombinationOfFields/object_event_all_possible_fields.xml:8
WithFullCombinationOfFields/transformation_event_all_possible_fields.xml:8
WithSensorData/SensorDataExamples.xml:2

@CraigRe please reopen and let's vote the last two bullets today

@CraigRe CraigRe reopened this Sep 21, 2021
@VladimirAlexiev
Copy link
Contributor Author

VladimirAlexiev commented Sep 21, 2021

Decided in Sep 21 telco:

  • gs1: values (Temperature, ERROR_CONDITION) should use full URLs in XML because no XML value uses CURIEs (they use full URNs or full URLs)
  • The convertor should implement contraction in XML->JSON (down to the level of barewords), and expansion in JSON->XML
  • We're keeping cbvmda: in the context
  • The convertor should treat prefix cbvmda: just like epcis: cbv: gs1: omit them on XML->JSON, and add them on JSON->XML
  • Craig and Elizabeth: GS1 US RxSecureSupplyChain WG uses cbvmda:itemExpirationDate and cbvmda:lotNumber as 2 of the key fields to meet DSCSA requirement. Can you confirm that in these discussions that we will NOT remove them? (confirmed)
  • That WG uses other namespaces with no trailing delimiter, eg xmlns:gs1ushc="http://epcis.gs1us.org/hc/ns" and it's recommended to add one (in this case slash)

Discussion: whether to add to the cbvmda namespace a trailing colon, or trailing hash, or nothing

  • Current HealthCare XMLs use hash for MasterData, and nothing for ILMD
  • CBV 2.0 sec 9.3.1: "use hash for all props, but use colon for props site, sst, ssa, ssd for backward compatibility with CBV 1.2"
  • Elizabeth and Neil will check with the HealthCare XML team
  • Recommendation: use trailing slash for web URL namespaces, colon for URN namespaces (and don't use hash)
    • Vladimir: I added colon in my context: urn:epcglobal:cbv:mda:
    • @jmcanterafonseca-iota please do in your context when we have a decision
  • @dakbhavesh please add a tweak in the XML 1.2->2.0 convertor to normalize to urn:epcglobal:cbv:mda:

@CraigRe
Copy link
Collaborator

CraigRe commented Sep 21, 2021

@CraigRe reflect above in CBV § 9.3.1, using : instead of #.

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

No branches or pull requests

2 participants