Skip to content

Commit

Permalink
Remove all abstract elements from constraint validation (#462)
Browse files Browse the repository at this point in the history
* Remove all abstract elements from constraint validation

* Make ResposibilityRole not abstract, and revert constraint check removal

* Update NeTEx_publication.xsd

* Update NeTEx_publication_timetable.xsd

---------

Co-authored-by: Matthias Günter <matthias.guenter@sbb.ch>
  • Loading branch information
skinkie and ue71603 authored May 1, 2024
1 parent 7ce0095 commit af04aa1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 148 deletions.
80 changes: 8 additions & 72 deletions xsd/NeTEx_publication.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -492,28 +492,6 @@
<xsd:selector xpath=".//netex:Entity_Entity"/>
<xsd:field xpath="@id"/>
</xsd:key>
<!-- =====TypeOfEntity============================== -->
<!-- =====TypeOfEntity unique========================== -->
<xsd:unique name="TypeOfEntity_UniqueBy_Id_Version">
<xsd:annotation>
<xsd:documentation>Every [TypeOfEntity Id + TypeOfEntity] must be unique within document.</xsd:documentation>
</xsd:annotation>
<xsd:selector xpath=".//netex:TypeOfEntity"/>
<xsd:field xpath="@id"/>
<xsd:field xpath="@version"/>
</xsd:unique>
<!-- =====TypeOfEntity============================== -->
<xsd:keyref name="TypeOfEntity_AnyKeyRef" refer="netex:TypeOfEntity_AnyVersionedKey">
<xsd:selector xpath=".//netex:TypeOfEntityRef"/>
<xsd:field xpath="@ref"/>
<xsd:field xpath="@version"/>
</xsd:keyref>
<!-- =====TypeOfEntity Key ========================== -->
<xsd:key name="TypeOfEntity_AnyVersionedKey">
<xsd:selector xpath=".//netex:TypeOfEntity"/>
<xsd:field xpath="@id"/>
<xsd:field xpath="@version"/>
</xsd:key>
<!-- =====Version============================== -->
<!-- =====Version unique========================== -->
<xsd:unique name="Version_UniqueBy_Id_Version">
Expand Down Expand Up @@ -1018,7 +996,7 @@
<xsd:field xpath="@version"/>
</xsd:keyref>
<xsd:key name="Link_AnyVersionedKey">
<xsd:selector xpath=".//netex:Link | .//netex:RouteLink | .//netex:TimingLink | .//netex:PathLink | .//netex:ServiceLink | .//netex:RoadElement | .//netex:RailwayElement | .//netex:WireElement | .//netex:ActivationLink"/>
<xsd:selector xpath=".//netex:RouteLink | .//netex:TimingLink | .//netex:PathLink | .//netex:ServiceLink | .//netex:RoadElement | .//netex:RailwayElement | .//netex:WireElement | .//netex:ActivationLink"/>
<xsd:field xpath="@id"/>
<xsd:field xpath="@version"/>
</xsd:key>
Expand Down Expand Up @@ -1056,7 +1034,7 @@
</xsd:unique>
<!-- =====PointOnLink Key ========================== -->
<xsd:keyref name="PointOnLink_AnyKeyRef" refer="netex:PointOnLink_AnyVersionedKey">
<xsd:selector xpath=".//netex:PointOnLinkRef | .//netex:StartPointOnLinkRef | .//netex:EndPointOnLinkRef"/>
<xsd:selector xpath=".//netex:StartPointOnLinkRef | .//netex:EndPointOnLinkRef"/>
<xsd:field xpath="@ref"/>
<xsd:field xpath="@version"/>
</xsd:keyref>
Expand Down Expand Up @@ -1198,7 +1176,7 @@
<xsd:field xpath="@version"/>
</xsd:keyref>
<xsd:key name="Zone_AnyVersionedKey">
<xsd:selector xpath=".//netex:Zone | .//netex:TariffZone | .//netex:FareZone | .//netex:RoutingConstraintZone | .//netex:ConnectionZone | .//netex:PointOfInterest | .//netex:Parking | .//netex:ParkingArea | .//netex:ParkingBay | .//netex:TopographicPlace | .//netex:Quay | .//netex:AccessSpace | .//netex:PointOfInterestSpace | .//netex:StopPlace | .//netex:Garage | .//netex:EquipmentPlace | .//netex:FlexibleArea | .//netex:HailAndRideArea | .//netex:FlexibleQuay | .//netex:StopPlaceEntrance | .//netex:PointOfInterestEntrance | .//netex:ParkingPassengerEntrance | .//netex:BoardingPosition | .//netex:VehicleStoppingPlace | .//netex:VehicleEntrance | .//netex:TaxiRank | .//netex:TaxiStand | .//netex:TransportAdministrativeZone | .//netex:AdministrativeZone | .//netex:GeneralZone"/>
<xsd:selector xpath=".//netex:Zone | .//netex:TariffZone | .//netex:FareZone | .//netex:RoutingConstraintZone | .//netex:ConnectionZone | .//netex:PointOfInterest | .//netex:Parking | .//netex:ParkingArea | .//netex:ParkingBay | .//netex:TopographicPlace | .//netex:Quay | .//netex:AccessSpace | .//netex:PointOfInterestSpace | .//netex:StopPlace | .//netex:Garage | .//netex:EquipmentPlace | .//netex:FlexibleArea | .//netex:HailAndRideArea | .//netex:FlexibleQuay | .//netex:StopPlaceEntrance | .//netex:PointOfInterestEntrance | .//netex:ParkingPassengerEntrance | .//netex:BoardingPosition | .//netex:VehicleStoppingPlace | .//netex:TaxiRank | .//netex:TaxiStand | .//netex:TransportAdministrativeZone | .//netex:AdministrativeZone | .//netex:GeneralZone"/>
<xsd:field xpath="@id"/>
<xsd:field xpath="@version"/>
</xsd:key>
Expand Down Expand Up @@ -1371,17 +1349,6 @@
<xsd:field xpath="@id"/>
<xsd:field xpath="@version"/>
</xsd:unique>
<!-- =====GroupOfLinkSequences Key ========================== -->
<xsd:keyref name="GroupOfLinkSequences_KeyRef" refer="netex:GroupOfLinkSequences_AnyVersionedKey">
<xsd:selector xpath=".//netex:GroupOfLinkSequencesRef"/>
<xsd:field xpath="@ref"/>
<xsd:field xpath="@version"/>
</xsd:keyref>
<xsd:key name="GroupOfLinkSequences_AnyVersionedKey">
<xsd:selector xpath=".//netex:GroupOfLinkSequences"/>
<xsd:field xpath="@id"/>
<xsd:field xpath="@version"/>
</xsd:key>
<!-- =====SimpleFeature============================== -->
<!-- =====SimpleFeature unique========================== -->
<xsd:unique name="SimpleFeature_UniqueBy_Id_Version">
Expand Down Expand Up @@ -3499,7 +3466,7 @@
</xsd:keyref>

<xsd:key name="Object_AnyVersionedKey">
<xsd:selector xpath=".//netex:ResourceFrame | .//netex:CompositeFrame | .//netex:SiteFrame | .//netex:ServiceFrame | .//netex:InfrastructureFrame | .//netex:TimetableFrame | .//netex:GeneralFrame | .//netex:SiteFrame | .//netex:ServiceCalendarFrame | .//netex:VehicleScheduleFrame | .//netex:DriverScheduleFrame | .//netex:FareFrame | .//netex:RailwayJunction | .//netex:RoadJunction | .//netex:WireJunction|.//netex:ReliefPoint | .//netex:GaragePoint | .//netex:ParkingPoint | .//netex:ScheduledStopPoint | .//netex:TimingPoint | .//netex:ActivationPoint | .//netex:BeaconPoint | .//netex:RoutePoint | .//netex:TrafficControlPoint | .//netex:Place | .//netex:StopPlace | .//netex:ServiceSite | .//netex:TopographicPlace | .//netex:PointOfInterest | .//netex:Parking | .//netex:EquipmentPlace | .//netex:FlexibleStopPlace | .//netex:AccessZone | .//netex:TariffZone | .//netex:RoadAddress | .//netex:PostalAddress | .//netex:Quay | .//netex:AccessSpace | .//netex:BoardingPosition | .//netex:StopArea | .//netex:HailAndRideArea | .//netex:FlexibleArea | .//netex:VehicleStoppingPlace | .//netex:VehicleStoppingPosition | .//netex:VehicleEntrance | .//netex:StopPlaceEntrance | .//netex:StopPlaceVehicleEntrance | .//netex:PointOfInterestEntrance | .//netex:ParkingPassengerEntrance | .//netex:ParkingEntranceForVehicles | .//netex:ParkingBay | .//netex:ParkingArea | .//netex:AdministrativeZone | .//netex:Country | .//netex:RoutingConstraintZone | .//netex:ActivationLink | .//netex:TimingLink | .//netex:ServiceLink | .//netex:Connection | .//netex:Access | .//netex:NavigationPath | .//netex:PathJunction | .//netex:VehicleJourney | .//netex:DeadRun | .//netex:ServiceJourney | .//netex:TemplateServiceJourney | .//netex:TemplateServiceJourney | .//netex:SpecialService | .//netex:DatedVehicleJourney | .//netex:NormalDatedVehicleJourney | .//netex:TimingPattern | .//netex:Operator | .//netex:GroupOfOperators | .//netex:Authority | .//netex:OtherOganisation | .//netex:TravelAgent | .//netex:ServicedOrganisation | .//netex:GeneralOrganisation | .//netex:ManagementAGent | .//netex:Line | .//netex:GroupOfLines | .//netex:Garage | .//netex:Crewbase | .//netex:TimingPattern | .//netex:Route | .//netex:ServicePattern | .//netex:DeadRunPattern | .//netex:GroupOfServices"/>
<xsd:selector xpath=".//netex:ResourceFrame | .//netex:CompositeFrame | .//netex:SiteFrame | .//netex:ServiceFrame | .//netex:InfrastructureFrame | .//netex:TimetableFrame | .//netex:GeneralFrame | .//netex:SiteFrame | .//netex:ServiceCalendarFrame | .//netex:VehicleScheduleFrame | .//netex:DriverScheduleFrame | .//netex:FareFrame | .//netex:RailwayJunction | .//netex:RoadJunction | .//netex:WireJunction|.//netex:ReliefPoint | .//netex:GaragePoint | .//netex:ParkingPoint | .//netex:ScheduledStopPoint | .//netex:TimingPoint | .//netex:ActivationPoint | .//netex:BeaconPoint | .//netex:RoutePoint | .//netex:TrafficControlPoint | .//netex:Place | .//netex:StopPlace | .//netex:ServiceSite | .//netex:TopographicPlace | .//netex:PointOfInterest | .//netex:Parking | .//netex:EquipmentPlace | .//netex:FlexibleStopPlace | .//netex:AccessZone | .//netex:TariffZone | .//netex:RoadAddress | .//netex:PostalAddress | .//netex:Quay | .//netex:AccessSpace | .//netex:BoardingPosition | .//netex:StopArea | .//netex:HailAndRideArea | .//netex:FlexibleArea | .//netex:VehicleStoppingPlace | .//netex:VehicleStoppingPosition | .//netex:StopPlaceEntrance | .//netex:StopPlaceVehicleEntrance | .//netex:PointOfInterestEntrance | .//netex:ParkingPassengerEntrance | .//netex:ParkingEntranceForVehicles | .//netex:ParkingBay | .//netex:ParkingArea | .//netex:AdministrativeZone | .//netex:Country | .//netex:RoutingConstraintZone | .//netex:ActivationLink | .//netex:TimingLink | .//netex:ServiceLink | .//netex:Connection | .//netex:Access | .//netex:NavigationPath | .//netex:PathJunction | .//netex:VehicleJourney | .//netex:DeadRun | .//netex:ServiceJourney | .//netex:TemplateServiceJourney | .//netex:TemplateServiceJourney | .//netex:SpecialService | .//netex:DatedVehicleJourney | .//netex:NormalDatedVehicleJourney | .//netex:TimingPattern | .//netex:Operator | .//netex:GroupOfOperators | .//netex:Authority | .//netex:OtherOganisation | .//netex:TravelAgent | .//netex:ServicedOrganisation | .//netex:GeneralOrganisation | .//netex:ManagementAGent | .//netex:Line | .//netex:GroupOfLines | .//netex:Garage | .//netex:Crewbase | .//netex:TimingPattern | .//netex:Route | .//netex:ServicePattern | .//netex:DeadRunPattern | .//netex:GroupOfServices"/>
<xsd:field xpath="@id"/>
<xsd:field xpath="@version"/>
</xsd:key> -->
Expand Down Expand Up @@ -5360,7 +5327,7 @@
<!-- =====InfrastructurePoint============================== -->
<!-- =====InfrastructurePoint Key ========================== -->
<xsd:keyref name="InfrastructurePoint_KeyRef" refer="netex:InfrastructurePoint_AnyVersionedKey">
<xsd:selector xpath=".//netex:InfrastructurePointRef | .//netex:OvertakingAtPointRef"/>
<xsd:selector xpath=".//netex:OvertakingAtPointRef"/>
<xsd:field xpath="@ref"/>
<xsd:field xpath="@version"/>
</xsd:keyref>
Expand All @@ -5372,7 +5339,7 @@
<!-- =====InfrastructurePoint============================== -->
<!-- =====InfrastructureLink Key ========================== -->
<xsd:keyref name="InfrastructureLink_KeyRef" refer="netex:InfrastructureLink_AnyVersionedKey">
<xsd:selector xpath=".//netex:InfrastructureLinkRef | .//netex:OvertakingOnLinkRef"/>
<xsd:selector xpath=".//netex:OvertakingOnLinkRef"/>
<xsd:field xpath="@ref"/>
<xsd:field xpath="@version"/>
</xsd:keyref>
Expand Down Expand Up @@ -7124,15 +7091,6 @@
<!-- =====JOURNEY Constraints========================= -->
<!-- ===== Journey================== -->
<!-- =====Journey unique========================== -->
<xsd:unique name="Journey_UniqueBy_Id_Version">
<xsd:annotation>
<xsd:documentation>Every [Journey Id + Version] must be unique within document.</xsd:documentation>
</xsd:annotation>
<xsd:selector xpath=".//netex:Journey"/>
<xsd:field xpath="@id"/>
<xsd:field xpath="@version"/>
</xsd:unique>
<!-- =====Journey unique========================== -->
<xsd:unique name="VehicleJourney_UniqueBy_Id_Version">
<xsd:annotation>
<xsd:documentation>Every [VehicleJourney Id + Version] must be unique within document.</xsd:documentation>
Expand Down Expand Up @@ -7191,7 +7149,7 @@
</xsd:unique>
<!-- =====Journey Key ========================== -->
<xsd:keyref name="Journey_KeyRef" refer="netex:Journey_AnyVersionedKey">
<xsd:selector xpath=".//netex:ServiceJourneyRef | .//netex:VehicleJourneyRef | .//netex:TemplateServiceJourneyRef | .//netex:JourneyRef | .//netex:DeadRunRef | .//netex:FromJourneyRef | .//netex:ToJourneyRef"/>
<xsd:selector xpath=".//netex:ServiceJourneyRef | .//netex:VehicleJourneyRef | .//netex:TemplateServiceJourneyRef | .//netex:DeadRunRef | .//netex:FromJourneyRef | .//netex:ToJourneyRef"/>
<xsd:field xpath="@ref"/>
<xsd:field xpath="@version"/>
</xsd:keyref>
Expand Down Expand Up @@ -7420,15 +7378,6 @@
<xsd:field xpath="@order"/>
</xsd:key>
<!-- =====JourneyFrequencyGroup============================== -->
<!-- =====JourneyFrequencyGroup unique========================== -->
<xsd:unique name="JourneyFrequencyGroup_UniqueBy_Id_Version">
<xsd:annotation>
<xsd:documentation>Every [JourneyFrequencyGroup Id + Version] must be unique within document.</xsd:documentation>
</xsd:annotation>
<xsd:selector xpath=".//netex:JourneyFrequencyGroup"/>
<xsd:field xpath="@id"/>
<xsd:field xpath="@version"/>
</xsd:unique>
<!-- =====JourneyFrequencyGroup Key ========================== -->
<xsd:keyref name="JourneyFrequencyGroup_KeyRef" refer="netex:JourneyFrequencyGroup_AnyVersionedKey">
<xsd:selector xpath=".//netex:JourneyFrequencyGroupRef"/>
Expand Down Expand Up @@ -8433,19 +8382,6 @@
<xsd:field xpath="@version"/>
<xsd:field xpath="@order"/>
</xsd:unique>
<!-- =====FareElementInSequence Key ========================== -->
<xsd:keyref name="FareElementInSequence_KeyRef" refer="netex:FareElementInSequence_AnyVersionedKey_ordered">
<xsd:selector xpath=".//netex:FareElementInSequenceRef"/>
<xsd:field xpath="@ref"/>
<xsd:field xpath="@version"/>
<xsd:field xpath="@order"/>
</xsd:keyref>
<xsd:key name="FareElementInSequence_AnyVersionedKey_ordered">
<xsd:selector xpath=".//netex:FareElementInSequence"/>
<xsd:field xpath="@id"/>
<xsd:field xpath="@version"/>
<xsd:field xpath="@order"/>
</xsd:key>
<!-- =====TypeOfFareStructureElement============================== -->
<!-- =====TypeOfFareStructureElement unique========================== -->
<xsd:unique name="TypeOfFareStructureElement_UniqueBy_Id_Version">
Expand Down Expand Up @@ -8670,7 +8606,7 @@
<xsd:field xpath="@version"/>
</xsd:keyref>
<xsd:key name="FarePrice_AnyVersionedKey">
<xsd:selector xpath=".//netex:FarePrice | .//netex:FareProductPrice | .//netex:CappingRulePrice | .//netex:UsageParameterPrice | .//netex:FareStructureElementPrice | .//netex:ValidableElementPrice | .//netex:ControllableElementPrice | .//netex:DistanceMatrixElementPrice | .//netex:SeriesConstraintPrice | .//netex:GeographicalIntervalPrice | .//netex:TimeIntervalPrice | .//netex:SalesOfferPackagePrice | .//netex:FulfilmentMethodPrice | .//netex:QualityStructureFactorPrice | .//netex:ParkingPrice"/>
<xsd:selector xpath=".//netex:FareProductPrice | .//netex:CappingRulePrice | .//netex:UsageParameterPrice | .//netex:FareStructureElementPrice | .//netex:ValidableElementPrice | .//netex:ControllableElementPrice | .//netex:DistanceMatrixElementPrice | .//netex:SeriesConstraintPrice | .//netex:GeographicalIntervalPrice | .//netex:TimeIntervalPrice | .//netex:SalesOfferPackagePrice | .//netex:FulfilmentMethodPrice | .//netex:QualityStructureFactorPrice | .//netex:ParkingPrice"/>
<xsd:field xpath="@id"/>
<xsd:field xpath="@version"/>
</xsd:key>
Expand Down
Loading

0 comments on commit af04aa1

Please sign in to comment.