Skip to content

Commit

Permalink
RouteInstructionRef reintroduced (#588)
Browse files Browse the repository at this point in the history
* fix 466

with including also the stuff that Christophe wrote.

* Lint and update documentation tables

* Update xsd/netex_part_1/part1_networkDescription/netex_routeInstruction_version.xsd

Co-authored-by: Stefan de Konink <[email protected]>

* example, fixed choice, added constraints

* Lint and update documentation tables

* fix carrdinalties and a typo

* sequences in choice

* Lint and update documentation tables

* Apply suggestions from code review

* typos and simplification

* Lint and update documentation tables

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Stefan de Konink <[email protected]>
  • Loading branch information
3 people committed May 10, 2024
1 parent 94d7e81 commit be64880
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 10 deletions.
14 changes: 14 additions & 0 deletions examples/functions/simpleNetwork/Netex_SimpleNetwork_1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -606,10 +606,24 @@ v1.1 revised ids
<PointOnRoute version="any" id="mybus:RPIS_001o" order="0001">
<ScheduledStopPointRef version="032" ref="hde:SSP0001A"/>
<OnwardRouteLinkRef version="any" ref="hde:hde:RL_001o@SSP0001A+RteP021"/>
<routeInstructions>
<RouteInstruction id="ri1" version="any">
<Instruction>3rd road to the left</Instruction>
<Distance>100</Distance>
</RouteInstruction>
<RouteInstruction id="ri3" version="any">
<PathHeading>back</PathHeading>
<Transition>down</Transition>
<RoadName>false</RoadName>
</RouteInstruction>
</routeInstructions>
</PointOnRoute>
<PointOnRoute version="any" id="mybus:RPIS_001o" order="0002">
<RoutePointRef version="any" ref="hde:RteP021"/>
<OnwardRouteLinkRef version="any" ref="hde:RL_001o@RteP021+SSP0002B_a"/>
<routeInstructions>
<RouteInstructionRef ref="ri1" version="any"/>
</routeInstructions>
</PointOnRoute>
<PointOnRoute version="any" id="mybus:RPIS_001o" order="0003">
<ScheduledStopPointRef version="032" ref="hde:SSP0002B_a"/>
Expand Down
21 changes: 21 additions & 0 deletions xsd/NeTEx_publication.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -12318,6 +12318,27 @@
<xsd:field xpath="@id"/>
<xsd:field xpath="@version"/>
</xsd:key>
<!-- =====RouteInstruction ============================== -->
<!-- =====RouteInstruction Key ========================== -->
<xsd:unique name="RouteInstruction_UniqueBy_Id_Version">
<xsd:annotation>
<xsd:documentation>Every [RouteInstruction Id + Version] must be unique within document.</xsd:documentation>
</xsd:annotation>
<xsd:selector xpath=".//netex:RouteInstruction"/>
<xsd:field xpath="@id"/>
<xsd:field xpath="@version"/>
</xsd:unique>
<!-- =====RouteInstruction Key ========================== -->
<xsd:keyref name="RouteInstruction_KeyRef" refer="netex:RouteInstruction_AnyVersionedKey">
<xsd:selector xpath=".//netex:RouteInstructionRef"/>
<xsd:field xpath="@ref"/>
<xsd:field xpath="@version"/>
</xsd:keyref>
<xsd:key name="RouteInstruction_AnyVersionedKey">
<xsd:selector xpath=".//netex:RouteInstruction"/>
<xsd:field xpath="@id"/>
<xsd:field xpath="@version"/>
</xsd:key>
</xsd:element>
<!-- =====END OF CONSTRAINTS================= -->
<xsd:complexType name="PublicationDeliveryStructure">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,18 @@ Rail transport, Roads and Road transport
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="strictContainmentAggregationStructure">
<xsd:sequence>
<xsd:choice>
<xsd:element ref="RouteInstructionRef" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>A reference to an instruction on how to follow a ROUTE through the network.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="RouteInstruction" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>An Instruction on how to follow a ROUTE through the network.</xsd:documentation>
<xsd:documentation>An instruction on how to follow a ROUTE through the network.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:choice>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
Expand Down Expand Up @@ -132,27 +137,27 @@ Rail transport, Roads and Road transport
<xsd:element ref="PointOnRouteRef" minOccurs="0"/>
<xsd:element name="Instruction" type="MultilingualString" default="false" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Directions for following path step. </xsd:documentation>
<xsd:documentation>Directions for following path step.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="PathHeading" type="PathHeadingEnumeration" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Relative heading for Instruction</xsd:documentation>
<xsd:documentation>Relative heading for Instruction.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Heading" type="CompassBearing16Enumeration" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Heading for Instructioni nternational boundary between two countries may be crossed.</xsd:documentation>
<xsd:documentation>Heading for instruction.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Bearing" type="AbsoluteBearingType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Compass Bearing for Instruction</xsd:documentation>
<xsd:documentation>Compass Bearing for Instruction.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Distance" type="DistanceType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Distance for step. </xsd:documentation>
<xsd:documentation>Distance for step.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Transition" type="TransitionEnumeration" minOccurs="0">
Expand All @@ -162,7 +167,7 @@ Rail transport, Roads and Road transport
</xsd:element>
<xsd:element name="RoadName" type="MultilingualString" default="false" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Directions for following path staep. </xsd:documentation>
<xsd:documentation>Directions for following path step.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="SimpleFeatureRef" minOccurs="0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ Rail transport, Roads and Road transport
</xsd:element>
<xsd:element name="routeInstructions" type="routeInstructions_RelStructure" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Instructins for following route. +v1.1</xsd:documentation>
<xsd:documentation>Instructions for following a route. +v1.1</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
Expand Down

0 comments on commit be64880

Please sign in to comment.