Template:Change

From railML 3 Wiki
Jump to navigation Jump to search

Usage

This template is suposed to standardize the depiction of changes between railML® versions. It is used in certain subpages of Dev:Changes.

Arguments

The template has five optional arguments:

  • fact: a prompt of the change, e.g. Element X has been extended by attribute Y.
  • reason: an explanation of why and how the change has been implemented.
  • recomendation: any recomendations
  • trac: a list of related trac tickets. Pleas, employ Template:Ticket.
  • svn: a list of related svn commits. Please, employ Template:SVN.
  • example: An example, usually a code snippet.
  • xsd: updated XSD-files
  • nattr: new attributes
  • uattr: updated attributes
  • nelem: new Elements
  • uelem: updated Elements

Empty Template

{{change
|fact=
|reason=
|recomendation=
|trac=
|svn=
|example=
|xsd=
|nattr=
|uattr=
|nelem=
|uelem=
}}

Example

{{change
|fact={{Attr|@abbrevation}} and {{attr|@number}} in the {{IS:Tag|ocp|wiki=2}} element have been declared deprecated. {{attr|@parentOcpRef}} and {{Tag|is|designator|wiki=2}} have been introduced. {{doc|is|additionalName|ocp|wiki=2}} has been expanded by {{tag|IS|additionalName|ocp|@=type|wiki=2}}.
|reason=There are multiple different abbreviations and numbers for single operation or control points. They can't be defined with one attribute. Use, depending on context, {{IS:Tag|designator|wiki=2}} or {{Doc|is|additionalName|ocp|wiki=2}} instead. {{attr|@parentOcpRef}} allows for grouping ocps. {{IS:Tag|designator|wiki=2}} allows for more codes than the depricated {{attr|@code}}, plus it can establish a relation with the [[dev:codelists|codelist]] ''Registers.xml''. {{Doc|is|additionalName|ocp|wiki=2|@type}} allows to declare the context of a name: is it valid under operational or traffic aspects, or as a local name?
|recomendation=Use the new {{IS:Tag|tsi|wiki=2}} and/or {{IS:Tag|designator|wiki=2}} elements instead.
|trac={{ticket|112}}, {{ticket|153}}
|svn={{SVN|335}}, {{SVN|439}}
|example=Old sample ({{rml|2.1}}):
<syntaxhighlight lang="xml">
<ocp ... name="Passau Hbf." abbrevation="NPA"/>
</syntaxhighlight>
New sample ({{rml|2.2}}):
<syntaxhighlight lang="xml">
<ocp ... name='Passau Hbf.' ...>
  <tsi country="80"/>
  <designator register='RL100' entry='NPA'/>
  <designator register='ENEE' entry='80-26506-6'/>
  <designator register='PLC' entry='DE18274'/>
  <designator register='IBNR' entry='8000298'/>
  <designator register='DB640' entry='Pa'/>
</ocp>
</syntaxhighlight>
}}

delivers:


Fact: @abbrevation and @number in the <ocp> element have been declared deprecated. @parentOcpRef and <designator> have been introduced. additionalName has been expanded by <additionalName>@type.
Reason: There are multiple different abbreviations and numbers for single operation or control points. They can't be defined with one attribute. Use, depending on context, <designator> or additionalName instead. @parentOcpRef allows for grouping ocps. <designator> allows for more codes than the depricated @code, plus it can establish a relation with the codelist Registers.xml. additionalName allows to declare the context of a name: is it valid under operational or traffic aspects, or as a local name?
Recomendation: Use the new <tsi> and/or <designator> elements instead.
Related Trac Tickets: #112, #153
Example: Old sample (railML® 2.1):
<ocp ... name="Passau Hbf." abbrevation="NPA"/>

New sample (railML® 2.2):

<ocp ... name='Passau Hbf.' ...>
  <tsi country="80"/>
  <designator register='RL100' entry='NPA'/>
  <designator register='ENEE' entry='80-26506-6'/>
  <designator register='PLC' entry='DE18274'/>
  <designator register='IBNR' entry='8000298'/>
  <designator register='DB640' entry='Pa'/>
</ocp>