Skip to content

Commit

Permalink
Prioritize TAP TSI validation (#743)
Browse files Browse the repository at this point in the history
* Prioritize TAP TSI validation

* fixing examples part1

* deprecated invalid examples

* Lint and update documentation tables

---------

Co-authored-by: Matthias Günter <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 10, 2024
1 parent ec1035d commit 8ff04e2
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/validate-examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set -e

echo "Validating NeTEx XML examples ..."

if xmllint --noout --schema xsd/NeTEx_publication.xsd examples/standards/epiap/*xml && xmllint --noout --schema xsd/NeTEx_publication.xsd examples/functions/deprecation/*.xml examples/functions/calendar/*xml examples/functions/fares/*xml examples/functions/grouping/*xml examples/functions/newModes/*xml examples/functions/patterns/*xml examples/functions/pointOfInterest/*xml examples/functions/simpleNetwork/*xml examples/functions/site/*xml examples/functions/stopPlace/*xml examples/functions/timetable/*xml examples/functions/validityCondition/*xml examples/functions/variant/*xml examples/functions/vehicleSchedule/*xml examples/functions/versioning/*xml examples/standards/epip/*xml examples/standards/era_uic/*xml examples/standards/fxc/*xml examples/standards/gbfs/*xml examples/standards/gtfs/*xml examples/standards/neptune/*xml examples/standards/noptis/*xml examples/standards/tap_tsi/*xml examples/standards/txc/*xml examples/standards/vdv452/*/*xml examples/standards/vdv452/*/*/*xml; then
if xmllint --noout --schema xsd/NeTEx_publication.xsd examples/standards/tap_tsi/*xml examples/standards/tap_tsi/*/*xml && xmllint --noout --schema xsd/NeTEx_publication.xsd examples/standards/epiap/*xml && xmllint --noout --schema xsd/NeTEx_publication.xsd examples/functions/deprecation/*.xml examples/functions/calendar/*xml examples/functions/fares/*xml examples/functions/grouping/*xml examples/functions/newModes/*xml examples/functions/patterns/*xml examples/functions/pointOfInterest/*xml examples/functions/simpleNetwork/*xml examples/functions/site/*xml examples/functions/stopPlace/*xml examples/functions/timetable/*xml examples/functions/validityCondition/*xml examples/functions/variant/*xml examples/functions/vehicleSchedule/*xml examples/functions/versioning/*xml examples/standards/epip/*xml examples/standards/era_uic/*xml examples/standards/fxc/*xml examples/standards/gbfs/*xml examples/standards/gtfs/*xml examples/standards/neptune/*xml examples/standards/noptis/*xml examples/standards/tap_tsi/*xml examples/standards/txc/*xml examples/standards/vdv452/*/*xml examples/standards/vdv452/*/*/*xml; then
echo -e '\033[0;32mValidating NeTEx XML examples succeeded\033[0m'
else
echo -e '\033[0;31mValidating NeTEx XML examples failed\033[0m'
Expand Down
56 changes: 28 additions & 28 deletions examples/standards/tap_tsi/B1_NRT/Netex_tap_tsi_B1-1080-TCVP.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ This example provides an example of encodeing TAP TSI NRT fares in NeTEx XML
<FareFrame id="B1:TCVP:1080" version="any">
<Name>B.1 NRT fare based example for RU 1080 - Fare table description </Name>
<!-- TCVP 1080 Price Definitions : NeTex TARIFF-->
<salesPackages>
<SalesPackage id="2000" version="01" derivedFromVersionRef="0000" responsibilitySetRef="1080">
<salesOfferPackages>
<SalesOfferPackage id="2000" version="01" derivedFromVersionRef="0000" responsibilitySetRef="1080">
<validityConditions>
<ValidBetween>
<FromDate>2012-12-09T00:00:00Z</FromDate>
Expand All @@ -43,12 +43,12 @@ This example provides an example of encodeing TAP TSI NRT fares in NeTEx XML
<Name lang="ru">Flexpreis</Name>
</AlternativeName>
</alternativeNames>
<TypeOfSalesPackageRef version="any" ref="01"/>
<TypeOfSalesOfferPackageRef version="any" ref="01"/>
<ConditionSummary>
<TariffBasis>route</TariffBasis>
</ConditionSummary>
<validityParameterAssignments>
<GenericParameterAssignment version="any" id="2000">
<GenericParameterAssignment version="any" id="2000" order="1">
<limitations>
<GroupTicket id="2000" version="01">
<prices>
Expand All @@ -68,8 +68,8 @@ This example provides an example of encodeing TAP TSI NRT fares in NeTEx XML
</limitations>
</GenericParameterAssignment>
</validityParameterAssignments>
</SalesPackage>
<SalesPackage id="2002" version="01" derivedFromVersionRef="0000" responsibilitySetRef="1080">
</SalesOfferPackage>
<SalesOfferPackage id="2002" version="01" derivedFromVersionRef="0000" responsibilitySetRef="1080">
<validityConditions>
<ValidBetween>
<FromDate>2012-12-09T00:00:00Z</FromDate>
Expand All @@ -91,12 +91,12 @@ This example provides an example of encodeing TAP TSI NRT fares in NeTEx XML
<Name lang="ru">Private Railways</Name>
</AlternativeName>
</alternativeNames>
<TypeOfSalesPackageRef version="any" ref="01"/>
<TypeOfSalesOfferPackageRef version="any" ref="01"/>
<ConditionSummary>
<TariffBasis>route</TariffBasis>
</ConditionSummary>
<validityParameterAssignments>
<GenericParameterAssignment version="any" id="2002">
<GenericParameterAssignment version="any" id="2002" order="1">
<limitations>
<GroupTicket id="2002" version="01">
<prices>
Expand All @@ -116,8 +116,8 @@ This example provides an example of encodeing TAP TSI NRT fares in NeTEx XML
</limitations>
</GenericParameterAssignment>
</validityParameterAssignments>
</SalesPackage>
<SalesPackage id="8888" version="01" derivedFromVersionRef="0000" responsibilitySetRef="1080">
</SalesOfferPackage>
<SalesOfferPackage id="8888" version="01" derivedFromVersionRef="0000" responsibilitySetRef="1080">
<validityConditions>
<ValidBetween>
<FromDate>2012-12-09T00:00:00Z</FromDate>
Expand All @@ -139,12 +139,12 @@ This example provides an example of encodeing TAP TSI NRT fares in NeTEx XML
<Name lang="ru">Made up group</Name>
</AlternativeName>
</alternativeNames>
<TypeOfSalesPackageRef version="any" ref="01"/>
<TypeOfSalesOfferPackageRef version="any" ref="01"/>
<ConditionSummary>
<TariffBasis>route</TariffBasis>
</ConditionSummary>
<validityParameterAssignments>
<GenericParameterAssignment version="any" id="8888">
<GenericParameterAssignment version="any" id="8888" order="1">
<limitations>
<GroupTicket id="8888" version="01">
<prices>
Expand All @@ -164,8 +164,8 @@ This example provides an example of encodeing TAP TSI NRT fares in NeTEx XML
</limitations>
</GenericParameterAssignment>
</validityParameterAssignments>
</SalesPackage>
</salesPackages>
</SalesOfferPackage>
</salesOfferPackages>
</FareFrame>
<!-- ====RESOURCE FRAME======== -->
<ResourceFrame version="any" id="B1:Common:Resources">
Expand All @@ -188,29 +188,29 @@ This example provides an example of encodeing TAP TSI NRT fares in NeTEx XML
</PurposeOfGrouping>
</values>
</ValueSet>
<ValueSet version="any" id="tapB1:TypeOfSalesPackage" nameOfClass="TypeOfSalesPackage">
<ValueSet version="any" id="tapB1:TypeOfSalesOfferPackage" nameOfClass="TypeOfSalesOfferPackage">
<!-- UIC Common codes -->
<Name>Allowed values for TypeOfSalesPackagef code list B.1.1
<Name>Allowed values for TypeOfSalesOfferPackagef code list B.1.1
Fare type </Name>
<values>
<TypeOfSalesPackage version="any" id="01">
<TypeOfSalesOfferPackage version="any" id="01">
<Name>TCV Full Fare</Name>
</TypeOfSalesPackage>
<TypeOfSalesPackage version="any" id="02">
</TypeOfSalesOfferPackage>
<TypeOfSalesOfferPackage version="any" id="02">
<Name>Distance Based Fare</Name>
</TypeOfSalesPackage>
<TypeOfSalesPackage version="any" id="03">
</TypeOfSalesOfferPackage>
<TypeOfSalesOfferPackage version="any" id="03">
<Name>Market Fare</Name>
</TypeOfSalesPackage>
<TypeOfSalesPackage version="any" id="04">
</TypeOfSalesOfferPackage>
<TypeOfSalesOfferPackage version="any" id="04">
<Name>Group Fare</Name>
</TypeOfSalesPackage>
<TypeOfSalesPackage version="any" id="05">
</TypeOfSalesOfferPackage>
<TypeOfSalesOfferPackage version="any" id="05">
<Name>Supplement</Name>
</TypeOfSalesPackage>
<TypeOfSalesPackage version="any" id="06">
</TypeOfSalesOfferPackage>
<TypeOfSalesOfferPackage version="any" id="06">
<Name>Surcharge</Name>
</TypeOfSalesPackage>
</TypeOfSalesOfferPackage>
</values>
</ValueSet>
</typesOfValue>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ This example provides an example of encodeing TAP TSI NRT fares in NeTEx XML
</Codespace>
</codespaces>
<!-- TCVC 1080 Carriers : NeTex Operators -->
<typesOfValue>
<TypeOfNotice id="TCVM" version="any"/>
</typesOfValue>
<organisations>
<Operator id="uic:1080" version="01">
<ValidBetween>
Expand Down
3 changes: 3 additions & 0 deletions examples/standards/tap_tsi/B1_NRT/Netex_tap_tsi_B1-1080.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ This example provides an example of encodeing TAP TSI NRT fares in NeTEx XML
<ResourceFrame id="B1:TCVC@1080" version="any">
<Name>B.1 NRT fare based example for RU 1080 - Carriers</Name>
<!-- TCVC 1080 Carriers : NeTex Operators -->
<typesOfValue>
<TypeOfNotice id="TCVM" version="any"/>
</typesOfValue>
<organisations>
<Operator id="1080" version="01" responsibilitySetRef="1080">
<validityConditions>
Expand Down
2 changes: 1 addition & 1 deletion examples/standards/tap_tsi/B1_NRT/Netex_tap_tsi_B1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ V1.1 Extensively revised with improved ids and use of tarifffs.
<!-- === TARIFFS === -->
<tariffs>
<Tariff id="tap:NRT_Standard" version="1.0">
<ValidBetween id="tap:Tariff01" version="1.0">
<ValidBetween id="tap:Tariff01a" version="1.0">
<FromDate>2011-01-01T00:00:00Z</FromDate>
<ToDate>2014-01-01T00:00:00Z</ToDate>
</ValidBetween>
Expand Down

0 comments on commit 8ff04e2

Please sign in to comment.