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

Wrap all maxOccurs into an element #388

Open
ue71603 opened this issue Jul 28, 2023 · 5 comments
Open

Wrap all maxOccurs into an element #388

ue71603 opened this issue Jul 28, 2023 · 5 comments
Assignees
Labels
question Further information is requested
Milestone

Comments

@ue71603
Copy link
Contributor

ue71603 commented Jul 28, 2023

In NeTEx 0:n or 1:n are usually wrapped in an element. This is not done in SIRI and OJP.

Perhaps they should be. This would make a conversion to JSON a lot easier:

For possible JSON implementation having groups around everything that can exist n times would be great. Currently ServiceSection is just 1:n

We have about 40-50 instances in OJP. Should we do it?
We have some, where we did it.

@ue71603 ue71603 added the question Further information is requested label Jul 28, 2023
@ue71603 ue71603 added this to the v2.0 milestone Jul 28, 2023
@herlitze herlitze changed the title Warp all maxOccurs into an element Wrap all maxOccurs into an element Jul 31, 2023
@herlitze
Copy link
Contributor

I am open to it, but a JSON implementation would be defined by a JSON Schema and not a XSD. So we should think about creating a JSON Schema.

@skinkie
Copy link
Contributor

skinkie commented Jul 31, 2023

I am open to it, but a JSON implementation would be defined by a JSON Schema and not a XSD. So we should think about creating a JSON Schema.

That is already done by undersigned for OSDM. An automatic process is still something that may be interesting.

@ue71603
Copy link
Contributor Author

ue71603 commented Aug 15, 2023

The wrapping was not done in SIRI either. So, we would break it there.
For OJP about 150 cases need to be addressed:
C:\Users\ue71603\MG_Daten\github\OJP4\OJP\OJP_Availability.xsd
(Ln 26, Char 64) <xs:element name="MobilityUser" type="BookingUserStructure" maxOccurs="unbounded">
(Ln 231, Char 77) <xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 255, Char 80) <xs:element name="BookableTicket" type="FareProductStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 260, Char 93) <xs:element name="BookableServiceItem" type="BookableServiceItemStructure" minOccurs="0" maxOccurs="unbounded">
C:\Users\ue71603\MG_Daten\github\OJP4\OJP\OJP_Common.xsd
(Ln 79, Char 76) <xs:element name="Position" type="siri:LocationStructure" minOccurs="2" maxOccurs="unbounded">
(Ln 100, Char 74) <xs:element name="Points" type="siri:LocationStructure" minOccurs="3" maxOccurs="unbounded">
(Ln 125, Char 68) <xs:element name="OperatorRef" type="siri:OperatorRefStructure" maxOccurs="unbounded"/>
(Ln 138, Char 82) <xs:element name="OperatorRef" type="siri:OperatorRefStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 161, Char 63) <xs:element name="Line" type="siri:LineDirectionStructure" maxOccurs="unbounded">
(Ln 244, Char 80) <xs:element name="VehicleRef" type="siri:VehicleRefStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 249, Char 76) <xs:element name="TrainNumber" type="xs:normalizedString" minOccurs="0" maxOccurs="unbounded">
(Ln 402, Char 75) <xs:element name="Weekday" type="WeekdayTypeEnumeration" minOccurs="0" maxOccurs="unbounded">
C:\Users\ue71603\MG_Daten\github\OJP4\OJP\OJP_Fare.xsd
(Ln 72, Char 51) <xs:element ref="FareProductRef" minOccurs="0" maxOccurs="unbounded">
(Ln 106, Char 49) <xs:element name="Trip" type="TripStructure" maxOccurs="unbounded">
(Ln 123, Char 75) <xs:element name="FareResult" type="FareResultStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 146, Char 77) <xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 167, Char 70) <xs:element name="TripFareResult" type="TripFareResultStructure" maxOccurs="unbounded">
(Ln 172, Char 80) <xs:element name="MultiTripFareResult" type="MultiTripFareResultStructure" maxOccurs="unbounded">
(Ln 185, Char 81) <xs:element name="TariffZoneListInArea" type="TariffZoneListInAreaStructure" maxOccurs="unbounded">
(Ln 198, Char 77) <xs:element name="FareProduct" type="FareProductStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 203, Char 75) <xs:element name="StaticInfoUrl" type="WebLinkStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 244, Char 89) <xs:element name="TripFareProductReference" type="TripFareProductReferenceStructure" maxOccurs="unbounded">
(Ln 249, Char 77) <xs:element name="FareProduct" type="FareProductStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 259, Char 75) <xs:element name="StaticInfoUrl" type="WebLinkStructure" minOccurs="0" maxOccurs="unbounded">
C:\Users\ue71603\MG_Daten\github\OJP4\OJP\OJP_FareSupport.xsd
(Ln 16, Char 83) <xs:element name="BookingNote" type="InternationalTextStructure" minOccurs="1" maxOccurs="unbounded">
(Ln 96, Char 61) <xs:element name="TariffZone" type="TariffZoneStructure" maxOccurs="unbounded">
(Ln 109, Char 36) <xs:element ref="TariffZoneRef" maxOccurs="unbounded"/>
(Ln 222, Char 83) <xs:element name="BookingMethod" type="BookingMethodEnumeration" minOccurs="1" maxOccurs="unbounded">
(Ln 329, Char 71) <xs:element name="PurchaseMoment" type="PurchaseMomentEnumeration" maxOccurs="unbounded">
(Ln 379, Char 85) <xs:element name="BookingProcess" type="BookingProcessEnumeration" minOccurs="1" maxOccurs="unbounded">
(Ln 404, Char 67) <xs:element name="GroupBooking" type="GroupBookingEnumeration" maxOccurs="unbounded">
(Ln 480, Char 78) <xs:element name="BookingArrangement" type="BookingArrangementsStructure" maxOccurs="unbounded">
(Ln 515, Char 77) <xs:element name="EntitlementProduct" type="EntitlementProductStructure" maxOccurs="unbounded">
(Ln 624, Char 85) <xs:element name="RequiredCard" type="EntitlementProductStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 629, Char 82) <xs:element name="ValidFor" type="PassengerCategoryEnumeration" minOccurs="0" maxOccurs="unbounded">
(Ln 644, Char 94) <xs:element name="ValidityTariffZones" type="TariffZoneListInAreaStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 661, Char 69) <xs:element name="InfoUrl" type="WebLinkStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 666, Char 69) <xs:element name="SaleUrl" type="WebLinkStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 671, Char 102) <xs:element name="BookingArrangements" type="BookingArrangementsContainerStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 703, Char 77) <xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 714, Char 77) <xs:element name="FareProduct" type="FareProductStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 719, Char 75) <xs:element name="StaticInfoUrl" type="WebLinkStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 757, Char 78) <xs:element name="SalesPackageElementRef" type="FareProductRefStructure" maxOccurs="unbounded">
(Ln 770, Char 90) <xs:element name="FareAuthorityFilter" type="FareAuthorityRefStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 775, Char 91) <xs:element name="PassengerCategory" type="PassengerCategoryEnumeration" minOccurs="0" maxOccurs="unbounded">
(Ln 793, Char 77) <xs:element name="Traveller" type="FarePassengerStructure" minOccurs="0" maxOccurs="unbounded">
C:\Users\ue71603\MG_Daten\github\OJP4\OJP\OJP_JourneySupport.xsd
(Ln 141, Char 73) <xs:element name="Via" type="ServiceViaPointStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 146, Char 80) <xs:element name="Attribute" type="GeneralAttributeStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 362, Char 68) <xs:element ref="siri:ArrivalFormationAssignment" minOccurs="0" maxOccurs="unbounded"/>
(Ln 373, Char 70) <xs:element ref="siri:DepartureFormationAssignment" minOccurs="0" maxOccurs="unbounded"/>
(Ln 436, Char 69) <xs:element ref="siri:ExpectedDepartureOccupancy" minOccurs="0" maxOccurs="unbounded">
(Ln 441, Char 70) <xs:element ref="siri:ExpectedDepartureCapacities" minOccurs="0" maxOccurs="unbounded">
(Ln 588, Char 107) <xs:element name="IndividualTransportOptions" type="IndividualTransportOptionsStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 761, Char 111) ...ement name="IncludeAccessibilityDetails" type="AccessibilityDetailsProfileEnumeration" minOccurs="0" maxOccurs="unbounded">
(Ln 822, Char 65) <xs:element name="TrackSection" type="TrackSectionStructure" maxOccurs="unbounded">
C:\Users\ue71603\MG_Daten\github\OJP4\OJP\OJP_Lines.xsd
(Ln 19, Char 75) <xs:element name="LineResult" type="LineResultStructure" minOccurs="0" maxOccurs="unbounded"/>
(Ln 27, Char 77) <xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 47, Char 79) <xs:element name="RouteGeometry" type="LinearShapeStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 52, Char 71) <xs:element name="AreaGeometry" type="AreaStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 57, Char 63) <xs:element name="Mode" type="ModeStructure" minOccurs="0" maxOccurs="unbounded">
C:\Users\ue71603\MG_Daten\github\OJP4\OJP\OJP_Locations.xsd
(Ln 48, Char 77) <xs:element name="PlaceResult" type="PlaceResultStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 75, Char 87) <xs:element name="AllowedSystem" type="siri:ParticipantRefStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 143, Char 81) <xs:element name="PolylinePoint" type="siri:LocationStructure" minOccurs="3" maxOccurs="unbounded">
(Ln 152, Char 77) <xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 178, Char 63) <xs:element name="Mode" type="ModeStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 197, Char 65) <xs:element name="Language" type="xs:language" minOccurs="0" maxOccurs="unbounded">
(Ln 226, Char 70) <xs:element name="Type" type="PlaceTypeEnumeration" minOccurs="0" maxOccurs="unbounded">
(Ln 246, Char 93) <xs:element name="TopographicPlaceRef" type="TopographicPlaceRefStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 332, Char 70) <xs:element name="Type" type="PlaceTypeEnumeration" minOccurs="0" maxOccurs="unbounded">
(Ln 352, Char 93) <xs:element name="TopographicPlaceRef" type="TopographicPlaceRefStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 362, Char 88) <xs:element name="AdjacentSystem" type="siri:ParticipantRefStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 371, Char 65) <xs:element name="Language" type="xs:language" minOccurs="0" maxOccurs="unbounded">
(Ln 400, Char 95) <xs:element name="ExchangePointsResult" type="ExchangePointsResultStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 409, Char 77) <xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 434, Char 63) <xs:element name="Mode" type="ModeStructure" minOccurs="0" maxOccurs="unbounded">
C:\Users\ue71603\MG_Daten\github\OJP4\OJP\OJP_ModesSupport.xsd
(Ln 164, Char 91) <xs:element name="PtMode" type="siri:VehicleModesOfTransportEnumeration" minOccurs="0" maxOccurs="unbounded">
(Ln 169, Char 57) <xs:group ref="siri:PtModeChoiceGroup" minOccurs="0" maxOccurs="unbounded"/>
(Ln 182, Char 80) <xs:element name="PrivateMode" type="PrivateModesEnumeration" minOccurs="0" maxOccurs="unbounded">
C:\Users\ue71603\MG_Daten\github\OJP4\OJP\OJP_PlaceSupport.xsd
(Ln 49, Char 77) <xs:element name="PrivateCode" type="PrivateCodeStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 109, Char 77) <xs:element name="PrivateCode" type="PrivateCodeStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 180, Char 77) <xs:element name="PrivateCode" type="PrivateCodeStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 244, Char 101) <xs:element name="PointOfInterestCategory" type="PointOfInterestCategoryStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 249, Char 77) <xs:element name="PrivateCode" type="PrivateCodeStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 267, Char 53) <xs:element name="OsmTag" type="OsmTagStructure" maxOccurs="unbounded">
(Ln 272, Char 70) <xs:element name="PointOfInterestClassification" type="xs:string" maxOccurs="unbounded">
(Ln 284, Char 76) <xs:element name="POIAdditionalInformation" type="CategoryKeyValueType" maxOccurs="unbounded">
(Ln 328, Char 101) <xs:element name="PointOfInterestCategory" type="PointOfInterestCategoryStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 405, Char 77) <xs:element name="PrivateCode" type="PrivateCodeStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 479, Char 80) <xs:element name="Attribute" type="GeneralAttributeStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 513, Char 80) <xs:element name="AllowedSystemId" type="xs:normalizedString" minOccurs="0" maxOccurs="unbounded">
C:\Users\ue71603\MG_Daten\github\OJP4\OJP\OJP_RequestSupport.xsd
(Ln 77, Char 77) <xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 105, Char 51) <xs:element name="Place" type="PlaceStructure" maxOccurs="unbounded"/>
(Ln 113, Char 70) <xs:element name="Operator" type="siri:AffectedOperatorStructure" maxOccurs="unbounded">
C:\Users\ue71603\MG_Daten\github\OJP4\OJP\OJP_SituationSupport.xsd
(Ln 13, Char 89) <xs:element name="PtSituation" type="siri:PtSituationElementStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 18, Char 93) <xs:element name="RoadSituation" type="siri:RoadSituationElementStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 43, Char 39) <xs:element ref="SituationFullRef" maxOccurs="unbounded"/>
C:\Users\ue71603\MG_Daten\github\OJP4\OJP\OJP_StopEvents.xsd
(Ln 176, Char 85) <xs:element name="StopEventResult" type="StopEventResultStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 199, Char 77) <xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 216, Char 81) <xs:element name="PreviousCall" type="CallAtNearStopStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 226, Char 79) <xs:element name="OnwardCall" type="CallAtNearStopStructure" minOccurs="0" maxOccurs="unbounded">
C:\Users\ue71603\MG_Daten\github\OJP4\OJP\OJP_TripInfo.xsd
(Ln 139, Char 77) <xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 144, Char 77) <xs:element name="PreviousCall" type="CallAtStopStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 154, Char 75) <xs:element name="OnwardCall" type="CallAtStopStructure" minOccurs="0" maxOccurs="unbounded">
C:\Users\ue71603\MG_Daten\github\OJP4\OJP\OJP_Trips.xsd
(Ln 16, Char 59) <xs:element name="Origin" type="PlaceContextStructure" maxOccurs="unbounded">
(Ln 21, Char 64) <xs:element name="Destination" type="PlaceContextStructure" maxOccurs="unbounded">
(Ln 26, Char 65) <xs:element name="Via" type="TripViaStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 32, Char 83) <xs:element name="ViaSystem" type="siri:ParticipantRefStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 38, Char 67) <xs:element name="NotVia" type="NotViaStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 43, Char 75) <xs:element name="NoChangeAt" type="NoChangeAtStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 115, Char 86) <xs:element name="ItModesToCover" type="IndividualModesEnumeration" minOccurs="0" maxOccurs="unbounded">
(Ln 383, Char 75) <xs:element name="TripResult" type="TripResultStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 406, Char 77) <xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 423, Char 77) <xs:element name="TripFare" type="TripFareResultStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 481, Char 79) <xs:element name="Feasibility" type="FeasibilityEnumeration" minOccurs="0" maxOccurs="unbounded">
(Ln 535, Char 47) <xs:element name="Leg" type="LegStructure" maxOccurs="unbounded">
(Ln 542, Char 79) <xs:element name="Feasibility" type="FeasibilityEnumeration" minOccurs="0" maxOccurs="unbounded">
(Ln 616, Char 86) <xs:element name="LegIntermediates" type="LegIntermediateStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 631, Char 79) <xs:element name="LegAttribute" type="LegAttributeStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 642, Char 85) <xs:element name="ParallelService" type="ParallelServiceStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 691, Char 80) <xs:element name="Attribute" type="GeneralAttributeStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 701, Char 79) <xs:element name="Feasibility" type="FeasibilityEnumeration" minOccurs="0" maxOccurs="unbounded">
(Ln 760, Char 79) <xs:element name="Feasibility" type="FeasibilityEnumeration" minOccurs="0" maxOccurs="unbounded">
(Ln 861, Char 79) <xs:element name="PathGuidanceSection" type="PathGuidanceSectionStructure" maxOccurs="unbounded">
(Ln 898, Char 67) <xs:element name="Follow" type="FollowStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 1275, Char 102) <xs:element name="AccessibilityFeature" type="AccessibilityFeatureTypesEnumeration" minOccurs="0" maxOccurs="unbounded">
(Ln 1280, Char 53) <xs:element ref="SituationFullRef" minOccurs="0" maxOccurs="unbounded">
(Ln 1327, Char 59) <xs:element name="Origin" type="PlaceContextStructure" maxOccurs="unbounded">
(Ln 1332, Char 64) <xs:element name="Destination" type="PlaceContextStructure" maxOccurs="unbounded">
(Ln 1337, Char 65) <xs:element name="Via" type="TripViaStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 1342, Char 67) <xs:element name="NotVia" type="NotViaStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 1347, Char 75) <xs:element name="NoChangeAt" type="NoChangeAtStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 1442, Char 95) <xs:element name="MultiPointTripResult" type="MultiPointTripResultStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 1465, Char 77) <xs:element name="ErrorCondition" type="OJPErrorStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 1483, Char 77) <xs:element name="TripFare" type="TripFareResultStructure" minOccurs="0" maxOccurs="unbounded">
(Ln 1574, Char 59) <xs:element name="RefineLegRef" type="LegObjectIdType" maxOccurs="unbounded">
(Ln 1611, Char 74) <xs:element name="UnknownLegRef" type="LegObjectIdType" minOccurs="0" maxOccurs="unbounded">
(Ln 1616, Char 75) <xs:element name="TripResult" type="TripResultStructure" minOccurs="0" maxOccurs="unbounded">
C:\Users\ue71603\MG_Daten\github\OJP4\OJP\OJP_Utility.xsd
(Ln 62, Char 71) <xs:element name="Text" type="siri:NaturalLanguageStringStructure" maxOccurs="unbounded">

@ue71603
Copy link
Contributor Author

ue71603 commented Aug 23, 2023

@Aurige : What do you think?

@ue71603 ue71603 modified the milestones: v2.0, v2.1 Sep 20, 2023
@ue71603
Copy link
Contributor Author

ue71603 commented Sep 20, 2023

We will do this, when Siri has done before.

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

No branches or pull requests

4 participants