Wrong assignment of ActualVehicleEquipmentGroup
I noticed that EquipmentRef can be assigned to WheelchairVehicleEquipment and AccessVehicleEquipment. This seemed wrong to me. My guess is that the ActualVehicleEquipmentGroup shouldn't be part of them.
Currently things like this can be done:
<ActualVehicleEquipment>
<Units>3</Units>
<AccessVehicleEquipmentRef ref="a"/>
</ActualVehicleEquipment>
<AccessVehicleEquipment version="any" id="a">
<Units>3</Units><!-- feels wrong -->
<BedEquipmentRef ref="x"/><!-- feels wrong -->
<!-- equipment properties here -->
</AccessVehicleEquipment>
I think only this should be possible
<ActualVehicleEquipment>
<Units>3</Units>
<AccessVehicleEquipmentRef ref="a"/>
</ActualVehicleEquipment>
<AccessVehicleEquipment version="any" id="a">
<!-- equipment properties here -->
</AccessVehicleEquipment>
The commit states that these changes are originally from @nick-knowles
I don't think this is the right solution. I think that the cause is more in the direction of the subsitution group...
@skinkie you disagree it seems
@skinkie Can you please elaborate what substitution group you are referring to (I assume substitutionGroup="PassengerEquipment") and how it would solve the problem?
In my solution I probably would also have to change <xsd:extension base="ActualVehicleEquipment_VersionStructure"> for WheelchairVehicleEquipment_VersionStructure and AccessVehicleEquipment_VersionStructure. Though to be honest, I haven't understood the usage of X_VersionStructure yet.
@Robbendebiene therefore I want to have @Aurige or @nick-knowles comment here.
This is coming from Transmodel ... If I remember well the key point of the ActualVehicleEquipment is to connect the Equipment to a VehicleType, but as the ActualVehicleEquipment can be standalone, it also needs to be able to refer an Equipment (not to be used when already embedded in an Equipment). But I'm puzzled by the VehicleType relation (instead of Vehicle) in the XSD ...
So changes here would require a larger group discussion
I feel like there might be a small misunderstanding, so I just want to restate that the problem I'm reporting is more about AccessVehicleEquipment and WheelchairVehicleEquipment than about ActualVehicleEquipment.
Simply speaking I think AccessVehicleEquipment and WheelchairVehicleEquipment should not incorporate any properties from ActualVehicleEquipment (like the EquipmentRef). Instead ActualVehicleEquipment should be used to reference AccessVehicleEquipment and WheelchairVehicleEquipment.
I think ActualVehicleEquipment is fine except that it doesn't make sense to allow it in ResourceFrame/equipments and that there is a small inconsistency in what actualVehicleEquipments can contain which I described here: https://github.com/NeTEx-CEN/NeTEx/issues/875
But I'm puzzled by the VehicleType relation (instead of Vehicle) in the XSD ...
That is actually a question I had as well which I raised here https://github.com/NeTEx-CEN/NeTEx/issues/875#issue-3010873449 So perhaps it makes sense to discuss these topics together.
Happy to approve if @skinkie running the script confirms that no examples are broken
THIS FAILS.
examples/functions/timetable/Netex_21_Rail_NetworkTimetable_eurostar.xml:11730: Schemas validity error : Element '{http://www.netex.org.uk/netex}AccessibilityAssessment': This element is not expected. Expected is one of ( {http://www.netex.org.uk/netex}validityConditions, {http://www.netex.org.uk/netex}ValidBetween, {http://www.netex.org.uk/netex}alternativeTexts, {http://www.netex.org.uk/netex}keyList, {http://www.netex.org.uk/netex}privateCodes, {http://www.netex.org.uk/netex}Extensions, {http://www.netex.org.uk/netex}BrandingRef, {http://www.netex.org.uk/netex}Name, {http://www.netex.org.uk/netex}PrivateCode, {http://www.netex.org.uk/netex}PublicCode ).
Where it fails:
<WheelchairVehicleEquipment version="any" id="est:WheelchairVehicleEquipment:sfe_veheq_trne_LP01_10_02">
<AccessibilityAssessment version="any" id="est:acaa_sfe_veheq_trne_LP01_10_02">
<MobilityImpairedAccess>true</MobilityImpairedAccess>
<suitabilities>
<Suitability id="est:acsst_sfe_veheq_trne_LP01_10_02">
<MobilityNeed>wheelchair</MobilityNeed>
<Suitable>notSuitable</Suitable>
</Suitability>
</suitabilities>
</AccessibilityAssessment>
<NumberOfWheelchairAreas>1</NumberOfWheelchairAreas>
<WidthOfAccessArea>1.0</WidthOfAccessArea>
<CompanionSeat>true</CompanionSeat>
</WheelchairVehicleEquipment>
THIS FAILS.
examples/functions/timetable/Netex_21_Rail_NetworkTimetable_eurostar.xml:11730: Schemas validity error : Element '{http://www.netex.org.uk/netex}AccessibilityAssessment': This element is not expected. Expected is one of ( {http://www.netex.org.uk/netex}validityConditions, {http://www.netex.org.uk/netex}ValidBetween, {http://www.netex.org.uk/netex}alternativeTexts, {http://www.netex.org.uk/netex}keyList, {http://www.netex.org.uk/netex}privateCodes, {http://www.netex.org.uk/netex}Extensions, {http://www.netex.org.uk/netex}BrandingRef, {http://www.netex.org.uk/netex}Name, {http://www.netex.org.uk/netex}PrivateCode, {http://www.netex.org.uk/netex}PublicCode ).
Where it fails:
<WheelchairVehicleEquipment version="any" id="est:WheelchairVehicleEquipment:sfe_veheq_trne_LP01_10_02"> <AccessibilityAssessment version="any" id="est:acaa_sfe_veheq_trne_LP01_10_02"> <MobilityImpairedAccess>true</MobilityImpairedAccess> <suitabilities> <Suitability id="est:acsst_sfe_veheq_trne_LP01_10_02"> <MobilityNeed>wheelchair</MobilityNeed> <Suitable>notSuitable</Suitable> </Suitability> </suitabilities> </AccessibilityAssessment> <NumberOfWheelchairAreas>1</NumberOfWheelchairAreas> <WidthOfAccessArea>1.0</WidthOfAccessArea> <CompanionSeat>true</CompanionSeat> </WheelchairVehicleEquipment>
Interesting, it is a modelling way we do not use in France as for us it is a bit redundant. If you are describing a WheelchairVehicleEquipment, we do not use AccessibilityAssessment 😄
So there are two options:
- Deprecate the properties inherited from
ActualVehicleEquipmentGroupforWheelchairVehicleEquipmentandAccessVehicleEquipmentinstead of removing them because they are on master and also used in an example. - Adjust the example and keep removing these properties. This would break backwards compatibility but on the other hand it is a bug which was never intended to work.
Which way to go?
The online view of Transmodel 2021 (https://transmodel-cen.eu/model/) also contains the inheritance of ActualVehicleEquipment. So this at least explains why it is in NeTEx as well.
The question basically boils down to:
Should AccessibilityAssessment be on the equipment definition as well (like it is e.g. for SanitaryEquipment) or should it only be on ActualVehicleEquipment?
From a DeckPlan perspective one always requires an ActualVehicleEquipment so it is not needed in this area.
However if the equipment is assigned via an VehicleEquipmentProfile or directly to a Trailing/TractiveElementType (as in the failing example) referencing an ActualVehicleEquipment which in turn references another equipment feels odd.
I am all for deprecating erronous modeling.
I added a separate group to annotate the properties as deprecated.