Template:Switch/Dev:SemanticConstraints: Difference between revisions

From railML 3 Wiki
Jump to navigation Jump to search
[checked revision][checked revision]
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#switch:{{{1}}}
<includeonly>{{#switch:{{{1}}}
|IS:001={{DefSemcon|{{{1}}}|{{{2}}}|text=Starting time stamp (e.g. "from") shall be lower or equal any ending time stamp (e.g. "to") if both are given. Must not overlap with other validity periods within the same enclosing element.|status=approved|proposed=2024-01-15|approved=2024-04-15}}
|IS:001={{DefSemcon|{{{1}}}|{{{2}}}|text=Starting time stamp (e.g. "from") shall be lower or equal any ending time stamp (e.g. "to") if both are given. Must not overlap with other validity periods within the same enclosing element.|status=approved|proposed=2024-01-15|approved=2024-04-15}}
|IS:005={{DefSemcon|{{{1}}}|{{{2}}}|text={{@|height|IS:signalConstruction}} and {{@|positionAtTrack|IS:signalConstruction}} should not be used with {{@|type|IS:signalConstruction}}=virtual.|status=approved|proposed=2021-02-26|forum=https://www.railml.org/forum/index.php?t=msg&th=975&start=0&|approved=2025-02-03}}
|IS:005={{DefSemcon|{{{1}}}|{{{2}}}|text={{@|height|IS:signalConstruction}} and {{@|positionAtTrack|IS:signalConstruction}} should not be used with {{@|type|IS:signalConstruction}}=virtual.|status=approved|proposed=2021-02-26|forum=https://www.railml.org/forum/index.php?t=msg&th=975&start=0&|approved=2025-02-03}}
Line 17: Line 17:
|TT:001={{DefSemcon|{{{1}}}|{{{2}}}|text=The {{Attr|next}} attribute shall reference an {{TT:Tag|operationalTrainSectionPart}} that is not referenced by any other {{Attr|next}}-reference. In other words: Within the chain of {{TT:Tag|operationalTrainSectionPart}}s linked by the attribute {{attr|next}}, there can be no element that has more than one predecessor. The {{@|next}} reference must establish a one to one relationship between two {{TT:Tag|operationalTrainSectionPart}}s. |status=approved|proposed=2022-09-15|approved=2022-10-13|id=TT:001}}
|TT:001={{DefSemcon|{{{1}}}|{{{2}}}|text=The {{Attr|next}} attribute shall reference an {{TT:Tag|operationalTrainSectionPart}} that is not referenced by any other {{Attr|next}}-reference. In other words: Within the chain of {{TT:Tag|operationalTrainSectionPart}}s linked by the attribute {{attr|next}}, there can be no element that has more than one predecessor. The {{@|next}} reference must establish a one to one relationship between two {{TT:Tag|operationalTrainSectionPart}}s. |status=approved|proposed=2022-09-15|approved=2022-10-13|id=TT:001}}
|TT:002={{DefSemcon|{{{1}}}|{{{2}}}|text=When calculating which {{TT:Tag|operationalTrainVariant}} of an {{TT:Tag|operationalTrain}} is valid on a particular day always a maximum of one '''active''' {{TT:Tag|operationalTrainVariant}} shall be the result. If the result is more than one {{TT:Tag|operationalTrainVariant}}, all except one shall be marked as {{TT:Tag|isCancelled}} or {{TT:Tag|isOnRequest}}. Please see the invalid code below.|status=approved|proposed=2023-01-12|approved=2023-04-06|id=TT:002}}
|TT:002={{DefSemcon|{{{1}}}|{{{2}}}|text=When calculating which {{TT:Tag|operationalTrainVariant}} of an {{TT:Tag|operationalTrain}} is valid on a particular day always a maximum of one '''active''' {{TT:Tag|operationalTrainVariant}} shall be the result. If the result is more than one {{TT:Tag|operationalTrainVariant}}, all except one shall be marked as {{TT:Tag|isCancelled}} or {{TT:Tag|isOnRequest}}. Please see the invalid code below.|status=approved|proposed=2023-01-12|approved=2023-04-06|id=TT:002}}
|TT:003={{DefSemcon|{{{1}}}|{{{2}}}|text=When calculating which {{TT:Tag|commercialTrainVariant}} of a {{TT:Tag|commercialTrain}} is valid on a particular day always a maximum of one '''active''' {{TT:Tag|commercialTrainVariant}} shall be the result. If the result is more than one {{TT:Tag|commercialTrainVariant}}, all except one shall be marked as {{TT:Tag|isCancelled}} or {{TT:Tag|isOnRequest}}.|status=approved|proposed=2023-01-12|approved=2023-04-06}}
|TT:004={{DefSemcon|{{{1}}}|{{{2}}}|text=The itinerary sections of an {{TT:Tag|operationalTrainVariant}}, defined by the {{TT:Tag|operationalTrainSection}}s and their respective {{TT:Tag|range}}s, that are not {{TT:Tag|isCancelled}} and not marked as {{TT:Tag|isOnRequest}}, must be pairwise disjoint, except for their respective first and last {{TT:Tag|baseItineraryPoint}}s.|status=approved|proposed=2023-01-12|approved=2023-03-09|id=TT:004|forum=https://www.railml.org/forum/index.php?t=msg&th=894&start=0&}}
|TT:005={{DefSemcon|{{{1}}}|{{{2}}}|text=The first(last) {{TT:Tag|baseItineraryPoint}} of each {{TT:Tag|operationalTrainSection}} within an {{TT:Tag|operationalTrainVariant}} must either be the referenced {{TT:Tag|itinerary}}'s first(last) {{TT:Tag|baseItineraryPoint}}, or coincide with another section's last(first) {{TT:Tag|baseItineraryPoint}}.|status=approved|proposed=2023-01-12|approved=2023-03-09|id=TT:005|forum=https://www.railml.org/forum/index.php?t=msg&th=894&start=0&}}
|TT:006={{DefSemcon|{{{1}}}|{{{2}}}|text=The itinerary sections of a {{TT:Tag|commercialTrainVariant}}, defined by the {{TT:Tag|commercialTrainSection}}s and their respective {{TT:Tag|range}}s, that are not {{TT:Tag|isCancelled}} and not marked as {{TT:Tag|isOnRequest}}, must be pairwise disjoint, except for their respective first and last {{TT:Tag|baseItineraryPoint}}s.|status=approved|proposed=2023-01-12|approved=2023-03-09|id=TT:006|forum=https://www.railml.org/forum/index.php?t=msg&th=894&start=0&}}
|TT:007={{DefSemcon|{{{1}}}|{{{2}}}|text=The first(last) {{TT:Tag|baseItineraryPoint}} of each {{TT:Tag|commercialTrainSection}} within a {{TT:Tag|commercialTrainVariant}} must either be the referenced {{TT:Tag|itinerary}}'s first(last) {{TT:Tag|baseItineraryPoint}}, or coincide with another section's last(first) {{TT:Tag|baseItineraryPoint}}.|status=approved|proposed=2023-01-12|approved=2023-03-09|id=TT:007|forum=https://www.railml.org/forum/index.php?t=msg&th=894&start=0&}}
|TT:008={{DefSemcon|{{{1}}}|{{{2}}}|text=No two attributes //{{TT:Tag|times}}/{{@|scope}} of the same enclosing {{TT:Tag|baseItineraryPoint}} element shall have the same value.|status=approved|approved=2025-04-07|proposed=2024-11-21|id=TT:008|forum=https://www.railml.org/forum/index.php?t=msg&th=1013&start=0&}}
|#default={{fixme}}
|#default={{fixme}}
}}
}}
<noinclude>{{interwiki}}[[category:Template]]</noinclude>
</includeonly><noinclude>
== Usage ==
This template is a central place for definitions of semantic constraints.
 
To define a new semantic constraint, add a line using [[Template:DefSemcon]]. The workflow is explained [[Template:DefSemcon#Workflow|'''here''']].
 
{{interwiki}}[[category:Template]]</noinclude>

Latest revision as of 16:38, 19 May 2025

Usage

This template is a central place for definitions of semantic constraints.

To define a new semantic constraint, add a line using Template:DefSemcon. The workflow is explained here.