Template:DefSemcon

From railML 3 Wiki
Jump to navigation Jump to search

Usage

The purpose of this template is to define semantic constraints.

Workflow

  • Define a semantic constraint using Template:DefSemcon in Template:Switch/Dev:SemanticConstraints, e.g. |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}}
  • Call this definition in Template:List/Dev:SemanticConstraints, e.g. {{Switch/Dev:SemanticConstraints|IS:001}}
  • Call this definition in the respective element page, e.g. {{Switch/Dev:SemanticConstraints|IS:001|instance}}

Arguments

  • 1: The ID, e.g. IS:001
  • 2:The mode. Use 2=instance to introduce a semantic constraint in an element article. Any other value (or no value at all) results in a table line for Template:List/Dev:SemanticConstraints
  • text: The text of the semantic constraint
  • link: Link to the text of the semantic constreint, if the text is placed in a separate template. This is necessary e.g. if the thext contains line breakes.
  • status: Can be proposed, discarded, approved or deprecated.
  • proposed: The proposal date (YYYY-MM-DD)
  • approved: The approval date (YYYY-MM-DD)
  • deprecated: The deprecation date (YYYY-MM-DD)
  • forum: The link to the place where to discuss the semantic constraint