Template:ElementDocu: Difference between revisions

From railML 2 Wiki
Jump to navigation Jump to search
[checked revision][checked revision]
(Abschnitte „Inherited Attributes“ und „Specific Attributes“ zusammengelegt)
(+anchor)
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>
{{head|{{{elementName|FIXME}}}}}
{{#if:{{{intro|}}}|{{note|{{intro|{{{intro}}}}}<br>This element was introduced with '''version {{{intro}}}'''.<br />{{deu|Dieses Element wurde mit '''Version {{{intro}}}''' eingeführt.}}|reminder}}}}
{{#if:{{{depr|}}}|{{note|{{depr|{{{depr}}}}}<br>This element was deprecated with '''version {{{depr}}}'''<br />{{deu|Dieses Element wurde mit '''Version {{{depr}}}''' abgeschafft.}}|reminder}}}}
== Scheme description / {{Deu|Schemenbeschreibung}} / {{Fra|Description du schéma}} ==
== Scheme description / {{Deu|Schemenbeschreibung}} / {{Fra|Description du schéma}} ==
=== Position of {{{elementName|FIXME}}} in the XML-Tree / {{Deu|Position von {{{elementName|FIXME}}} im XML-Baum}} / {{Fra|position de {{{elementName|FIXME}}} dans l’aborescence XML}} ===
=== Position of {{{elementName|FIXME}}} in the XML-Tree / {{Deu|Position von {{{elementName|FIXME}}} im XML-Baum}} / {{Fra|position de {{{elementName|FIXME}}} dans l’aborescence XML}} ===
Line 7: Line 10:
* Children: {{{childs|''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''}}}
* Children: {{{childs|''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''}}}


{{anchor|multiplicity}}
===Multiplicity / {{Deu|Anzahl}} / {{fra|Multiplicité}} ===
[[dev:Multiplicity|<nowiki>[</nowiki>{{{minocc|1}}}..{{{maxocc|1}}}<nowiki>]</nowiki>]]
{{anchor|semantics}}
=== Semantics / {{Deu|Bedeutung}} / {{Fra|Sémantique}} ===
=== Semantics / {{Deu|Bedeutung}} / {{Fra|Sémantique}} ===


{{{semantics|FIXME}}}
{{{semantics|FIXME}}}
=== Attributes of {{{elementName|FIXME}}}  / {{Deu|Attribute von {{{elementName|FIXME}}}}} / {{Fra|Attributs de {{{elementName|FIXME}}}}} ===
{{#if:{{{semcon|}}}|<br>&nbsp;<br>{{semconHint}}}}
{{#if:{{{inheritedAttributes|}}}||{{#if:{{{ownAttributes|}}}||''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''}}}}
===Attributes of {{{elementName|FIXME}}}  / {{Deu|Attribute von {{{elementName|FIXME}}}}} / {{Fra|Attributs de {{{elementName|FIXME}}}}} ===
{{{inheritedAttributes}}}
{{#if:{{Boolandnoteq|{{{inheritedAttributes|}}}|{{{inheritedAttributes}}}|''None''}}
|{{#if:{{Boolandnoteq|{{{ownAttributes|}}}|{{{ownAttributes}}}|''None''}}
|<!--beide if treffen zu-->{{{inheritedAttributes}}}
{{{ownAttributes}}}
{{{ownAttributes}}}
 
|<!--nur inherited besteht-->{{{inheritedAttributes}}}<!--zweites if zu-->}}
=== Constraints / {{Deu|Beschränkungen}} / {{Fra|Contraintes}} ===
|<!--inherited nicht-->{{#if:{{Boolandnoteq|{{{ownAttributes|}}}|{{{ownAttributes}}}|''None''}}
|<!--nur own-->{{{ownAttributes}}}
|<!--keines-->{{#if:{{{inheritedAttributes|}}}{{{ownAttributes|}}}|''None''|''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''}}<!--viertes if zu-->}}<!--drittes if zu-->
}}<!--erstes if zu-->
=== Syntactic Constraints / {{Deu|Syntaktische Beschränkungen}} / {{Fra|Contraintes syntactiques}} ===


{{{constraints|''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''}}}
{{{constraints|''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''}}}
 
{{#if:{{{semcon|}}}|<div id="semcon"></div>
<div id="semcon"></div>
===Semantic Constraints / {{deu|Semantische Beschränkungen}} / {{Fra|Contraintes semantiques}} ===
{{{semcon}}}
}}
== Best practice & Examples / {{Deu|Empfohlene Anwendung & Beispiele}} / {{Fra|Bonnes pratiques & exemples}} ==
== Best practice & Examples / {{Deu|Empfohlene Anwendung & Beispiele}} / {{Fra|Bonnes pratiques & exemples}} ==


Line 31: Line 49:
<!--
<!--
=== Example / {{Deu|Beispiel}} / {{Fra|Exemple}} ===
=== Example / {{Deu|Beispiel}} / {{Fra|Exemple}} ===
{{{example|''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''}}}
-->
-->
{{{example|''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''}}}
== Open issues / {{Deu|Offene Punkte/Pedenzen}} / {{Fra|Questions ouvertes}} ==
== Open issues / {{Deu|Offene Punkte/Pedenzen}} / {{Fra|Questions ouvertes}} ==


Line 44: Line 62:
|RS = Rollingstock_Elements
|RS = Rollingstock_Elements
|TT = Timetable_Elements
|TT = Timetable_Elements
|Vorlage = Element_Template
|IL = Interlocking Elements
|Template = Element_Template
|FIXME
|FIXME
}}|{{#explode:{{FULLPAGENAME}}|:|-1}}]]
}}|{{#explode:{{FULLPAGENAME}}|:|-1}}]]
Line 57: Line 76:
**Children: {{{childs|''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''}}}
**Children: {{{childs|''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''}}}
*Semantics
*Semantics
*Inherited attributes from other data types
*Attributes
*Specific Attributes
*Constraints
*Constraints
*Best practice
*Best practice & Examples
*Additional information
*Notes
**Notes
**Example
*Open issues
*Open issues
===Parameters===
===Arguments===
*Obligatory:
*Obligatory:
**elementName — the name of the element
**elementName — the name of the element
Line 72: Line 88:
**parent — the name of the parent node within the XML tree
**parent — the name of the parent node within the XML tree
**childs — the children nodes
**childs — the children nodes
**inheritedAttributes — inherited attributes from other data types
**ownAttributes — specific, not inherited attributes of this element
**ownAttributes — specific, not inherited attributes of this element
**constraints
**constraints
**bestpractice — comments about best practice
**notes — general notes
**notes — general notes
**example
**example
**openissues — comments on open issues
**openissues — comments on open issues
**intro – You can optionally enter the version when the element was introduced. It will produce a reminder at the top of the article
**depr – You can optionally enter the version when the element was deprecated. It will produce a reminder at the top of the article
**minocc – the minimum number of occurances – default=1
**maxocc – the maximum of occurances – default=1
*Arguments to be discontinued — '''Do not use them anymore'''
**inheritedAttributes — inherited attributes from other data types — use ''ownAttributes'', as the distinction between own and inherited attributes will no longer be presented in this wiki.
**bestpractice — use ''example'', as the paragraphs ''Best Practice'' and ''Examples'' have been merged
===Dependencies===
===Dependencies===
The template depends on [[Template:Deu]] and [[Template:Fra]]. There is abig number of templates building on Template:ElementDocu.
The template depends on [[Template:Deu]] and [[Template:Fra]]. There is abig number of templates building on Template:ElementDocu.
Line 99: Line 120:
''This is an example. For readability reasons it is boxed.''
''This is an example. For readability reasons it is boxed.''


=== Inherited attributes from other data types / {{Deu|Abgeleitete Attribute von anderen Datentypen}} / {{Fra|Attributs hérités d’autres types données}} ===
===Attributes of FIXME / {{Deu|Attribute von FIXME}} / {{Fra|Attributs de FIXME}} ===
 
{{#if:{{Boolandnoteq||{{{inheritedAttributes}}}|''None''}}
''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''
|{{#if:{{Boolandnoteq||{{{ownAttributes}}}|''None''}}
 
|<!--beide if treffen zu-->{{{inheritedAttributes}}}
=== Specific Attributes of FIXME  / {{Deu|Spezielle Attribute von FIXME}} / {{Fra|Attributs spécifiques de FIXME}} ===
{{{ownAttributes}}}
 
|<!--nur inherited besteht-->{{{inheritedAttributes}}}<!--zweites if zu-->}}
''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''
|<!--inherited nicht-->{{#if:{{Boolandnoteq||{{{ownAttributes}}}|''None''}}
 
|<!--nur own-->{{{ownAttributes}}}
|<!--keines-->{{#if:|''None''|''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''}}<!--viertes if zu-->}}<!--drittes if zu-->
}}<!--erstes if zu-->
=== Constraints / {{Deu|Beschränkungen}} / {{Fra|Contraintes}} ===
=== Constraints / {{Deu|Beschränkungen}} / {{Fra|Contraintes}} ===


''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''
''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''


== Best practice / {{Deu|Empfohlene Anwendung}} / {{Fra|Bonnes pratiques}} ==
== Best practice & Examples / {{Deu|Empfohlene Anwendung & Beispiele}} / {{Fra|Bonnes pratiques & exemples}} ==
 
''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''


{{#if:|{{{bestpractice}}}|{{#if:|{{{example}}}|''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''}}}}
<!--{{{bestpractice|''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''}}}-->
<!--
== Additional information / {{Deu|Zusätzliche Informationen}} / {{Fra|Information supplémentaire}}  ==
== Additional information / {{Deu|Zusätzliche Informationen}} / {{Fra|Information supplémentaire}}  ==
 
-->
=== Notes / {{Deu|Anmerkungen}} / {{Fra|Notes}} ===
== Notes / {{Deu|Anmerkungen}} / {{Fra|Notes}} ==


''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''
''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''
 
<!--
=== Example / {{Deu|Beispiel}} / {{Fra|Exemple}} ===
=== Example / {{Deu|Beispiel}} / {{Fra|Exemple}} ===
 
-->
''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''
''Not yet described. / {{Deu|Noch nicht beschrieben.}} / {{Fra|Pas encore décrit.}}''



Revision as of 14:38, 21 April 2020

Usage

This template is the working horse of element documentation. It provides a standardized framework on which a number of ohter templates build upon.

Aricles employing the template have the following structure:

  • Scheme description
  • Position in the XML-Tree
    • Parent
    • Children: Not yet described. / Noch nicht beschrieben. /
  • Semantics
  • Attributes
  • Constraints
  • Best practice & Examples
  • Notes
  • Open issues

Arguments

  • Obligatory:
    • elementName — the name of the element
    • semantics — a human readable explanation of the function of the described element
  • Optional:
    • parent — the name of the parent node within the XML tree
    • childs — the children nodes
    • ownAttributes — specific, not inherited attributes of this element
    • constraints
    • notes — general notes
    • example
    • openissues — comments on open issues
    • intro – You can optionally enter the version when the element was introduced. It will produce a reminder at the top of the article
    • depr – You can optionally enter the version when the element was deprecated. It will produce a reminder at the top of the article
    • minocc – the minimum number of occurances – default=1
    • maxocc – the maximum of occurances – default=1
  • Arguments to be discontinued — Do not use them anymore
    • inheritedAttributes — inherited attributes from other data types — use ownAttributes, as the distinction between own and inherited attributes will no longer be presented in this wiki.
    • bestpractice — use example, as the paragraphs Best Practice and Examples have been merged

Dependencies

The template depends on Template:Deu and Template:Fra. There is abig number of templates building on Template:ElementDocu.

Example

{{Template:ElementDocu|ElementName=SomeSampleElement|semantics=''This is an example. For readability reasons it is boxed.''}}

delivers

Scheme description / Schemenbeschreibung /

Position of FIXME in the XML-Tree / Position von FIXME im XML-Baum /

  • Parent: Not yet described. / Noch nicht beschrieben. /
  • Children: Not yet described. / Noch nicht beschrieben. /

Semantics / Bedeutung /

This is an example. For readability reasons it is boxed.

Attributes of FIXME / Attribute von FIXME /

Not yet described. / Noch nicht beschrieben. /

Constraints / Beschränkungen /

Not yet described. / Noch nicht beschrieben. /

Best practice & Examples / Empfohlene Anwendung & Beispiele /

Not yet described. / Noch nicht beschrieben. /

Notes / Anmerkungen /

Not yet described. / Noch nicht beschrieben. / Not yet described. / Noch nicht beschrieben. /

Open issues / Offene Punkte/Pedenzen /

Not yet described. / Noch nicht beschrieben. /

An example of the application of this template afield is IS:signal.