<?xml version="1.0" encoding="UTF-8"?>
<!-- ==== VVS Stuttgart Fare  Example ====== 
This example attempts to encode VVS Stuttgart fare system

The fare system is based on counting the different fare zones travelled by one journey. Transport mode does not matter
The fare zones are ring-shaped with the city of Stuttgart in the centre. There are some border areas where special rules apply
Pricing is based on the number of zones travelled and rider category (adult, child, senior, low income etc)
There are some other exceptions:
- Tickets for short trips with 4 stops or less are available at reduced price
- There are special "local" tickets  certain communities
- VVS may decide to allow free travel on certain routes or in certain areas for a limited time


-->
<PublicationDelivery xmlns="http://www.netex.org.uk/netex" xmlns:siri="http://www.siri.org.uk/siri" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:schemaLocation="http://www.netex.org.uk/netex ../../../xsd/NeTEx_publication.xsd">
	<PublicationTimestamp>2023-10-04T18:01:32.0Z</PublicationTimestamp>
	<ParticipantRef>MENTZ</ParticipantRef>
	<Description>NeTEx Export, Version: 19.18.0.0</Description>
	<dataObjects>
		<CompositeFrame version="1" id="de:vvs:compositeFrame:1">
			<validityConditions>
				<ValidBetween>
					<FromDate>2023-01-01T00:00:00Z</FromDate>
					<ToDate>2023-12-31T00:00:00Z</ToDate>
				</ValidBetween>
			</validityConditions>
			<!--- ======= CODESPACEs======== -->
			<codespaces>
				<Codespace id="vvs">
					<Xmlns>vvs</Xmlns>
					<XmlnsUrl>http://www.vvs.de</XmlnsUrl>
					<Description>Fare data</Description>
				</Codespace>
			</codespaces>
			<!--- =======FRAME DEFAULTS======== -->
			<FrameDefaults>
				<DefaultCodespaceRef ref="vvs"/>
			</FrameDefaults>
			<frames>
				<ServiceFrame id="de:vvs:ServiceFrame:vvs" version="any">
					<directions>
						<Direction id="de:vvs:Direction:H" version="any">
							<Name lang="de">Hin</Name>
							<ShortName lang="de">H</ShortName>
							<DirectionType>outbound</DirectionType>
						</Direction>
						<Direction id="de:vvs:Direction:R" version="any">
							<Name lang="de">Rück</Name>
							<ShortName lang="de">R</ShortName>
							<DirectionType>inbound</DirectionType>
						</Direction>
					</directions>
					<lines>
						<Line id="de:vvs:Line:31102_.j23" version="1" responsibilitySetRef="de:vvs:ResponsibilitySet:SVE_SVE">
							<ValidBetween>
								<FromDate>2022-12-11T00:00:00</FromDate>
								<ToDate>2023-09-08T23:59:59</ToDate>
							</ValidBetween>
							<privateCodes>
								<PrivateCode>102</PrivateCode>
							</privateCodes>
							<Name lang="de">102</Name>
							<ShortName lang="de">102</ShortName>
							<Description>Zell - Esslingen (N) ZOB - Weil - Mettingen Mettingen - Weil - Esslingen (N) ZOB - Zell</Description>
							<TransportMode>bus</TransportMode>
							<TransportSubmode>
								<BusSubmode>unknown</BusSubmode>
							</TransportSubmode>
							<PublicCode>102</PublicCode>
							<OperatorRef version="any" ref="de:vvs:Operator:69"/>
							<OperationalContextRef version="any" ref="de:vvs:OperationalContext:31"/>
						</Line>
					</lines>
					<tariffZones>
						<TariffZone id="de:vvs:TariffZone:1" version="any">
							<privateCodes>
								<PrivateCode>1</PrivateCode>
							</privateCodes>
							<ShortName lang="de">1</ShortName>
						</TariffZone>
						<TariffZone id="de:vvs:TariffZone:2" version="any">
							<privateCodes>
								<PrivateCode>2</PrivateCode>
							</privateCodes>
							<ShortName lang="de">2</ShortName>
						</TariffZone>
						<TariffZone id="de:vvs:TariffZone:3" version="any">
							<privateCodes>
								<PrivateCode>3</PrivateCode>
							</privateCodes>
							<ShortName lang="de">3</ShortName>
						</TariffZone>
						<TariffZone id="de:vvs:TariffZone:4" version="any">
							<privateCodes>
								<PrivateCode>4</PrivateCode>
							</privateCodes>
							<ShortName lang="de">4</ShortName>
						</TariffZone>
						<TariffZone id="de:vvs:TariffZone:5" version="any">
							<privateCodes>
								<PrivateCode>5</PrivateCode>
							</privateCodes>
							<ShortName lang="de">5</ShortName>
						</TariffZone>
						<TariffZone id="de:vvs:TariffZone:6o" version="any">
							<privateCodes>
								<PrivateCode>6</PrivateCode>
							</privateCodes>
							<ShortName lang="de">6 (orange)</ShortName>
						</TariffZone>
						<TariffZone id="de:vvs:TariffZone:6g" version="any">
							<privateCodes>
								<PrivateCode>6</PrivateCode>
							</privateCodes>
							<ShortName lang="de">6 (gray)</ShortName>
						</TariffZone>
						<TariffZone id="de:vvs:TariffZone:7o" version="any">
							<privateCodes>
								<PrivateCode>7</PrivateCode>
							</privateCodes>
							<ShortName lang="de">7 (orange)</ShortName>
						</TariffZone>
						<TariffZone id="de:vvs:TariffZone:7g" version="any">
							<privateCodes>
								<PrivateCode>7</PrivateCode>
							</privateCodes>
							<ShortName lang="de">7 (gray)</ShortName>
						</TariffZone>
						<TariffZone id="de:vvs:TariffZone:8g" version="any">
							<privateCodes>
								<PrivateCode>8</PrivateCode>
							</privateCodes>
							<ShortName lang="de">8 (gray)</ShortName>
						</TariffZone>
					</tariffZones>
				</ServiceFrame>
				<FareFrame version="1" id="de:vvs:FareFrame:vvs">
					<FrameDefaults>
						<DefaultCurrency>EUR</DefaultCurrency>
					</FrameDefaults>
					<geographicalUnits>
						<!--- ====Geographical Unit======== -->
						<GeographicalUnit version="any" id="de:vvs:GeographicalUni:tariff_zone">
							<Name>One zone</Name>
						</GeographicalUnit>
					</geographicalUnits>
					<geographicalIntervals>
						<!--- Geographical intervals for 1..n zones travelled -->
						<GeographicalInterval id="de:vvs:GeographicalInterval:1_zone" version="any">
							<Name>1 zone</Name>
							<NumberOfUnits>1</NumberOfUnits>
							<IntervalType>tariffZone</IntervalType>
							<GeographicalUnitRef ref="de:vvs:GeographicalUni:tariff_zone" version="any"/>
						</GeographicalInterval>
						<GeographicalInterval id="de:vvs:GeographicalInterval:2_zones" version="any">
							<Name>2 zones</Name>
							<NumberOfUnits>2</NumberOfUnits>
							<IntervalType>tariffZone</IntervalType>
							<GeographicalUnitRef ref="de:vvs:GeographicalUni:tariff_zone" version="any"/>
						</GeographicalInterval>
						<GeographicalInterval id="de:vvs:GeographicalInterval:3_zones" version="any">
							<Name>3 zones</Name>
							<NumberOfUnits>3</NumberOfUnits>
							<IntervalType>tariffZone</IntervalType>
							<GeographicalUnitRef ref="de:vvs:GeographicalUni:tariff_zone" version="any"/>
						</GeographicalInterval>
						<GeographicalInterval id="de:vvs:GeographicalInterval:4_zones" version="any">
							<Name>4 zones</Name>
							<NumberOfUnits>4</NumberOfUnits>
							<IntervalType>tariffZone</IntervalType>
							<GeographicalUnitRef ref="de:vvs:GeographicalUni:tariff_zone" version="any"/>
						</GeographicalInterval>
						<GeographicalInterval id="de:vvs:GeographicalInterval:5_zones" version="any">
							<Name>5 zones</Name>
							<NumberOfUnits>5</NumberOfUnits>
							<IntervalType>tariffZone</IntervalType>
							<GeographicalUnitRef ref="de:vvs:GeographicalUni:tariff_zone" version="any"/>
						</GeographicalInterval>
						<GeographicalInterval id="de:vvs:GeographicalInterval:6_zones" version="any">
							<Name>6 zones</Name>
							<NumberOfUnits>7</NumberOfUnits>
							<IntervalType>tariffZone</IntervalType>
							<GeographicalUnitRef ref="de:vvs:GeographicalUni:tariff_zone" version="any"/>
						</GeographicalInterval>
						<GeographicalInterval id="de:vvs:GeographicalInterval:7_zones" version="any">
							<Name>7 zones</Name>
							<NumberOfUnits>7</NumberOfUnits>
							<IntervalType>tariffZone</IntervalType>
							<GeographicalUnitRef ref="de:vvs:GeographicalUni:tariff_zone" version="any"/>
						</GeographicalInterval>
						<GeographicalInterval id="de:vvs:GeographicalInterval:8_zones" version="any">
							<Name>8 zones</Name>
							<NumberOfUnits>8</NumberOfUnits>
							<IntervalType>tariffZone</IntervalType>
							<GeographicalUnitRef ref="de:vvs:GeographicalUni:tariff_zone" version="any"/>
						</GeographicalInterval>
					</geographicalIntervals>
					<fareStructureElements>
						<FareStructureElement id="de:vvs:FareStructureElement:1_zone" version="any">
							<GeographicalIntervalRef ref="de:vvs:GeographicalInterval:1_zone" version="any"/>
						</FareStructureElement>
						<FareStructureElement id="de:vvs:FareStructureElement:2_zones" version="any">
							<GeographicalIntervalRef ref="de:vvs:GeographicalInterval:2_zones" version="any"/>
						</FareStructureElement>
						<!-- it is not allowed to travel within the grey zones, but you can travel from orange to green -->
						<FareStructureElement id="de:vvs:FareStructureElement:forbidden_zones" version="any">
							<GroupOfDistanceMatrixElements id="de:vvs:GroupOfDistanceMatrixElements:1" version="any">
								<UseToExclude>true</UseToExclude>
								<!-- very practical, as it is much shorter to list the forbidden relations than the allowed ones -->
								<members>
									<DistanceMatrixElement id="de:vvs:DistanceMatrixElement:1" version="any">
										<StartTariffZoneRef ref="de:vvs:TariffZone:6g" version="any"/>
										<EndTariffZoneRef ref="de:vvs:TariffZone:6g" version="any"/>
									</DistanceMatrixElement>
									<DistanceMatrixElement id="de:vvs:DistanceMatrixElement:2" version="any">
										<StartTariffZoneRef ref="de:vvs:TariffZone:7g" version="any"/>
										<EndTariffZoneRef ref="de:vvs:TariffZone:7g" version="any"/>
									</DistanceMatrixElement>
									<DistanceMatrixElement id="de:vvs:DistanceMatrixElement:3" version="any">
										<StartTariffZoneRef ref="de:vvs:TariffZone:8g" version="any"/>
										<EndTariffZoneRef ref="de:vvs:TariffZone:8g" version="any"/>
									</DistanceMatrixElement>
									<DistanceMatrixElement id="de:vvs:DistanceMatrixElement:4" version="any">
										<StartTariffZoneRef ref="de:vvs:TariffZone:6g" version="any"/>
										<EndTariffZoneRef ref="de:vvs:TariffZone:7g" version="any"/>
									</DistanceMatrixElement>
									<DistanceMatrixElement id="de:vvs:DistanceMatrixElement:5" version="any">
										<StartTariffZoneRef ref="de:vvs:TariffZone:6g" version="any"/>
										<EndTariffZoneRef ref="de:vvs:TariffZone:8g" version="any"/>
									</DistanceMatrixElement>
									<DistanceMatrixElement id="de:vvs:DistanceMatrixElement:6" version="any">
										<StartTariffZoneRef ref="de:vvs:TariffZone:7g" version="any"/>
										<EndTariffZoneRef ref="de:vvs:TariffZone:8g" version="any"/>
									</DistanceMatrixElement>
								</members>
							</GroupOfDistanceMatrixElements>
						</FareStructureElement>
					</fareStructureElements>
					<tariffs>
						<Tariff version="any" id="de:vvs:Tariff:1">
							<Name>VVS Verbundtarif</Name>
						</Tariff>
					</tariffs>
					<!---Fare Products (Tickets you can buy) -->
					<fareProducts>
						<PreassignedFareProduct id="de:vvs:PreassignedFareProduct:02011" version="any">
							<Name>Einzelticket Erwachsene</Name>
							<validableElements>
								<ValidableElement id="de:vvs:ValidableElement:1" version="any">
									<fareStructureElements>
										<FareStructureElementRef ref="de:vvs:FareStructureElement:forbidden_zones" version="any"/>
									</fareStructureElements>
								</ValidableElement>
							</validableElements>
						</PreassignedFareProduct>
						<PreassignedFareProduct id="de:vvs:PreassignedFareProduct:02021" version="any">
							<Name>Einzelticket Kind</Name>
							<validableElements>
								<ValidableElement id="de:vvs:ValidableElement:2" version="any">
									<fareStructureElements>
										<FareStructureElementRef ref="de:vvs:FareStructureElement:forbidden_zones" version="any"/>
									</fareStructureElements>
								</ValidableElement>
							</validableElements>
						</PreassignedFareProduct>
					</fareProducts>
					<!--==== Sales Packages==== -->
					<fareTables>
						<FareTable id="de:vvs:FareTable:1" version="any">
							<Name>Prices single tickets  for adults</Name>
							<pricesFor>
								<SalesOfferPackageRef ref="de:vvs:SalesOfferPackage:1" version="any"/>
								<PreassignedFareProductRef ref="de:vvs:PreassignedFareProduct:02011"/>
							</pricesFor>
							<usedIn>
								<TariffRef ref="de:vvs:Tariff:1" version="any"/>
							</usedIn>
							<cells>
								<GeographicalIntervalPrice id="de:vvs:GeographicalIntervalPrice:1" version="any">
									<Name>Price for 1 zone</Name>
									<Amount>2.90</Amount>
									<GeographicalIntervalRef ref="de:vvs:GeographicalInterval:1_zone" version="any"/>
								</GeographicalIntervalPrice>
								<GeographicalIntervalPrice id="de:vvs:GeographicalIntervalPrice:2" version="any">
									<Name>Price for 2 zones</Name>
									<Amount>3.70</Amount>
									<GeographicalIntervalRef ref="de:vvs:GeographicalInterval:2_zones" version="any"/>
								</GeographicalIntervalPrice>
								<GeographicalIntervalPrice id="de:vvs:GeographicalIntervalPrice:3" version="any">
									<Name>Price for 3 zones</Name>
									<Amount>4.80</Amount>
									<GeographicalIntervalRef ref="de:vvs:GeographicalInterval:3_zones" version="any"/>
								</GeographicalIntervalPrice>
								<GeographicalIntervalPrice id="de:vvs:GeographicalIntervalPrice:4" version="any">
									<Name>Price for 4 zones</Name>
									<Amount>5.90</Amount>
									<GeographicalIntervalRef ref="de:vvs:GeographicalInterval:4_zones" version="any"/>
								</GeographicalIntervalPrice>
								<GeographicalIntervalPrice id="de:vvs:GeographicalIntervalPrice:5" version="any">
									<Name>Price for 5 zones</Name>
									<Amount>7.20</Amount>
									<GeographicalIntervalRef ref="de:vvs:GeographicalInterval:5_zones" version="any"/>
								</GeographicalIntervalPrice>
								<GeographicalIntervalPrice id="de:vvs:GeographicalIntervalPrice:6" version="any">
									<Name>Price for 6 zones</Name>
									<Amount>8.40</Amount>
									<GeographicalIntervalRef ref="de:vvs:GeographicalInterval:6_zones" version="any"/>
								</GeographicalIntervalPrice>
								<GeographicalIntervalPrice id="de:vvs:GeographicalIntervalPrice:7" version="any">
									<Name>Price for 7 zones</Name>
									<Amount>9.30</Amount>
									<GeographicalIntervalRef ref="de:vvs:GeographicalInterval:7_zones" version="any"/>
								</GeographicalIntervalPrice>
								<GeographicalIntervalPrice id="de:vvs:GeographicalIntervalPrice:8" version="any">
									<Name>Price for 8 zones</Name>
									<Amount>9.30</Amount>
									<GeographicalIntervalRef ref="de:vvs:GeographicalInterval:8_zones" version="any"/>
								</GeographicalIntervalPrice>
							</cells>
						</FareTable>
						<FareTable id="de:vvs:FareTable:2" version="any">
							<Name>Prices single tickets  for children</Name>
							<pricesFor>
								<SalesOfferPackageRef ref="de:vvs:SalesOfferPackage:1" version="any"/>
								<PreassignedFareProductRef ref="de:vvs:PreassignedFareProduct:02021"/>
							</pricesFor>
							<usedIn>
								<TariffRef ref="de:vvs:Tariff:1" version="any"/>
							</usedIn>
							<cells>
								<GeographicalIntervalPrice id="de:vvs:GeographicalIntervalPrice:11" version="any">
									<Name>Price for 1 zone</Name>
									<Amount>1.40</Amount>
									<GeographicalIntervalRef ref="de:vvs:GeographicalInterval:1_zone" version="any"/>
								</GeographicalIntervalPrice>
								<GeographicalIntervalPrice id="de:vvs:GeographicalIntervalPrice:12" version="any">
									<Name>Price for 2 zones</Name>
									<Amount>1.70</Amount>
									<GeographicalIntervalRef ref="de:vvs:GeographicalInterval:2_zones" version="any"/>
								</GeographicalIntervalPrice>
								<GeographicalIntervalPrice id="de:vvs:GeographicalIntervalPrice:13" version="any">
									<Name>Price for 3 zones</Name>
									<Amount>2.30</Amount>
									<GeographicalIntervalRef ref="de:vvs:GeographicalInterval:3_zones" version="any"/>
								</GeographicalIntervalPrice>
								<GeographicalIntervalPrice id="de:vvs:GeographicalIntervalPrice:14" version="any">
									<Name>Price for 4 zones</Name>
									<Amount>2.90</Amount>
									<GeographicalIntervalRef ref="de:vvs:GeographicalInterval:4_zones" version="any"/>
								</GeographicalIntervalPrice>
								<GeographicalIntervalPrice id="de:vvs:GeographicalIntervalPrice:15" version="any">
									<Name>Price for 5 zones</Name>
									<Amount>3.50</Amount>
									<GeographicalIntervalRef ref="de:vvs:GeographicalInterval:5_zones" version="any"/>
								</GeographicalIntervalPrice>
								<GeographicalIntervalPrice id="de:vvs:GeographicalIntervalPrice:16" version="any">
									<Name>Price for 6 zones</Name>
									<Amount>4.00</Amount>
									<GeographicalIntervalRef ref="de:vvs:GeographicalInterval:6_zones" version="any"/>
								</GeographicalIntervalPrice>
								<GeographicalIntervalPrice id="de:vvs:GeographicalIntervalPrice:17" version="any">
									<Name>Price for 7 zones</Name>
									<Amount>4.50</Amount>
									<GeographicalIntervalRef ref="de:vvs:GeographicalInterval:7_zones" version="any"/>
								</GeographicalIntervalPrice>
								<GeographicalIntervalPrice id="de:vvs:GeographicalIntervalPrice:18" version="any">
									<Name>Price for 8 zones</Name>
									<Amount>4.50</Amount>
									<GeographicalIntervalRef ref="de:vvs:GeographicalInterval:8_zones" version="any"/>
								</GeographicalIntervalPrice>
							</cells>
						</FareTable>
					</fareTables>
					<salesOfferPackages>
						<SalesOfferPackage id="de:vvs:SalesOfferPackage:1" version="any">
							<Name/>
							<distributionAssignments>
								<DistributionAssignment id="de:vvs:DistributionAssignment:1" version="any" order="1">
									<Name>Onboard</Name>
									<Description>Pay for ticket onboard</Description>
									<DistributionChannelRef versionRef="ntx:v1.0" ref="ntx:on_board"/>
									<DistributionChannelType>onBoard</DistributionChannelType>
									<TicketingServiceFacilityList>purchase</TicketingServiceFacilityList>
									<PaymentMethods>cashAndCard</PaymentMethods>
								</DistributionAssignment>
								<DistributionAssignment id="de:vvs:DistributionAssignment:2" version="any" order="1">
									<Name>TicketMachinr</Name>
									<Description>buy ticket at vending machine at stop</Description>
									<DistributionChannelType>atStop</DistributionChannelType>
									<TicketingServiceFacilityList>purchase</TicketingServiceFacilityList>
									<PaymentMethods>cashAndCard</PaymentMethods>
								</DistributionAssignment>
							</distributionAssignments>
							<salesOfferPackageElements>
								<SalesOfferPackageElement id="de:vvs:SalesOfferPackageElement:1" version="any" order="1">
									<TypeOfTravelDocumentRef ref="de:vvs:paper_ticket" version="any"/>
									<PreassignedFareProductRef ref="de:vvs:PreassignedFareProduct:02011" version="any"/>
								</SalesOfferPackageElement>
							</salesOfferPackageElements>
						</SalesOfferPackage>
					</salesOfferPackages>
				</FareFrame>
				<ResourceFrame id="de:vvs:ResourceFrame:vvs" version="any">
					<responsibilitySets>
						<ResponsibilitySet id="de:vvs:ResponsibilitySet:SVE_SVE" version="any">
							<privateCodes>
								<PrivateCode>SVE</PrivateCode>
							</privateCodes>
							<Name lang="de">Städtischer Verkehrsbetrieb Esslingen (SVE)</Name>
							<roles>
								<ResponsibilityRoleAssignment id="de:vvs:ResponsibilityRoleAssignment:SVE_SVE:1" version="any">
									<StakeholderRoleType>entityLegalOwnership</StakeholderRoleType>
									<ResponsibleOrganisationRef ref="de:vvs:Operator:69" version="any"/>
								</ResponsibilityRoleAssignment>
								<ResponsibilityRoleAssignment id="de:vvs:ResponsibilityRoleAssignment:SVE_SVE:2" version="any">
									<StakeholderRoleType>operation</StakeholderRoleType>
									<ResponsibleOrganisationRef ref="de:vvs:Operator:69" version="any"/>
								</ResponsibilityRoleAssignment>
							</roles>
						</ResponsibilitySet>
					</responsibilitySets>
					<typesOfValue>
						<ValueSet version="any" id="de:vvs:Types_of_Travel_Document" classOfValues="TypeOfTravelDocument">
							<Name>Types of Travel Document</Name>
							<values>
								<TypeOfTravelDocument id="de:vvs:paper_ticket" version="any">
									<Name>Ticket on paper</Name>
									<MediaType>paperTicket</MediaType>
									<MachineReadable>magneticStrip</MachineReadable>
								</TypeOfTravelDocument>
								<TypeOfTravelDocument id="de:vvs:mobile_ticket" version="any">
									<Name>Ticket on mobile phone</Name>
									<MediaType>mobileApp</MediaType>
									<MachineReadable>barCode</MachineReadable>
								</TypeOfTravelDocument>
							</values>
						</ValueSet>
					</typesOfValue>
					<organisations>
						<Operator id="de:vvs:Operator:69" version="any">
							<privateCodes>
								<PrivateCode>69</PrivateCode>
							</privateCodes>
							<Name lang="de">Städtischer Verkehrsbetrieb Esslingen (SVE)</Name>
							<ShortName lang="de">SVE</ShortName>
							<Description>Städtischer Verkehrsbetrieb Esslingen (SVE)</Description>
						</Operator>
					</organisations>
					<operationalContexts>
						<OperationalContext id="de:vvs:OperationalContext:31" version="any">
							<privateCodes>
								<PrivateCode>31</PrivateCode>
							</privateCodes>
							<Name lang="de">Bus (Region)</Name>
							<ShortName lang="de">BusP</ShortName>
						</OperationalContext>
					</operationalContexts>
				</ResourceFrame>
			</frames>
		</CompositeFrame>
	</dataObjects>
</PublicationDelivery>
