Understanding the implications of choice/groups #669
Labels
bug
Technical mistake, inconsistency with the documentation, etc.
enhancement
non semantic enhacement: technical enhancement, etc.
help wanted
question
Milestone
In the NeTEx schema choices are sometimes used as a container for groups. If we take a simple example like the CodeRangeGroup. It is to me unclear why a choice is actually used. Wasn't the intention to get the StartValue and EndValue? Or was the intention to choose from either of one.
https://github.com/NeTEx-CEN/NeTEx/blob/master/xsd/netex_framework/netex_genericFramework/netex_organisation_version.xsd#L786
Another variant can be observed in the AllSubmodeChoiceGroup. This variant expects the user to choose an element from either the PtSubmodeChoiceGroup or the PrivateSubmodeChoiceGroup.
https://github.com/NeTEx-CEN/NeTEx/blob/master/xsd/netex_framework/netex_reusableComponents/netex_submode_version.xsd#L86
A different variant of combinations appear in TargetPassingTimeGroup, ObservedPassingTimeGroup, EstimatedPassingTimeGroup. In my perspective these three objects are wrongfully using a choice.
https://github.com/NeTEx-CEN/NeTEx/blob/master/xsd/netex_part_2/part2_journeyTimes/netex_datedPassingTimes_version.xsd#L148
https://github.com/NeTEx-CEN/NeTEx/blob/master/xsd/netex_part_3/part3_monitoring/netex_monitoredPassingTimes_version.xsd#L148
https://github.com/NeTEx-CEN/NeTEx/blob/master/xsd/netex_part_3/part3_monitoring/netex_monitoredPassingTimes_version.xsd#L262
When we consider SiteConnectionEndStructure which gives us a choice of groups. In this case all sub elements, given they are part of the same group, may be added. Given that the groups are not elements, no natural grouping would surface. It wouldn't give the implementer any guidance if it would treat it with the same 'flattening' strategy as the AllSubmodeChoiceGroup. I guess we can agree 'this is something different', how to identify this difference is the question.
https://github.com/NeTEx-CEN/NeTEx/blob/master/xsd/netex_part_1/part1_tacticalPlanning/netex_siteConnection_version.xsd#L159
Given that the list of exceptions is rather small, would like this to be resolved. I have ignored SIRI for now.
The text was updated successfully, but these errors were encountered: