Template:ElementDocu: Difference between revisions
[checked revision] | [checked revision] |
No edit summary |
No edit summary |
||
(13 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
-->{{#vardefine:slug|{{#sub:{{PAGENAME}}|0|2}}}}<!-- | -->{{#vardefine:slug|{{#sub:{{PAGENAME}}|0|2}}}}<!-- | ||
-->{{#vardefine:erlEnd|{{#explode:{{PAGENAME}}| |1}}}}<!-- | -->{{#vardefine:erlEnd|{{#explode:{{PAGENAME}}| |1}}}}<!-- | ||
-->{{#vardefine:defPar|{{#ifeq:{{#var:erlEnd}}||''Not yet described. / {{Deu|Noch nicht beschrieben | -->{{#vardefine:defPar|{{#ifeq:{{#var:erlEnd}}||''Not yet described. / {{Deu|Noch nicht beschrieben.}}''|{{tag|{{#var:slug}}|{{#var:erlEnd}}}}}}}} | ||
__NOEDITSECTION__ | __NOEDITSECTION__ | ||
{{head|{{{elementName|{{#var:autitle}}}}}}} | {{head|{{{elementName|{{#var:autitle}}}}}}} | ||
{{# | {{#switch:{{{intro}}} | ||
|2.5={{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}}}} | {{#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 | == Scheme description / {{Deu|Schemenbeschreibung}} == | ||
=== Position of {{{elementName|{{#var:autitle}}}}} in the XML-Tree / {{Deu|Position von {{{elementName|{{#var:autitle}}}}} im XML-Baum | === Position of {{{elementName|{{#var:autitle}}}}} in the XML-Tree / {{Deu|Position von {{{elementName|{{#var:autitle}}}}} im XML-Baum}} === | ||
* Parent: {{{parent|{{#var:defPar}}}}} | * Parent: {{{parent|{{#var:defPar}}}}} | ||
* Children: {{{childs|''Not yet described. / {{Deu|Noch nicht beschrieben.}} | * Children: {{{childs|''Not yet described. / {{Deu|Noch nicht beschrieben.}}''}}} {{checkState|{{{childs}}}}} | ||
{{anchor|multiplicity}} | {{anchor|multiplicity}} | ||
===Multiplicity / {{Deu|Anzahl | ===Multiplicity / {{Deu|Anzahl}} === | ||
[[dev:Multiplicity|<nowiki>[</nowiki>{{{minocc|1}}}..{{{maxocc|1}}}<nowiki>]</nowiki>]]{{#if:{{{minocc|}}}||[[category:minocc]]}}{{#if:{{{maxocc|}}}||[[category:maxocc]]}}{{#if:{{{multi|}}}|<br>{{{multi}}}}} | [[dev:Multiplicity|<nowiki>[</nowiki>{{{minocc|1}}}..{{{maxocc|1}}}<nowiki>]</nowiki>]]{{#if:{{{minocc|}}}||[[category:minocc]]}}{{#if:{{{maxocc|}}}||[[category:maxocc]]}}{{#if:{{{multi|}}}|<br>{{{multi}}}}} | ||
{{anchor|semantics}} | {{anchor|semantics}} | ||
=== Semantics / {{Deu|Bedeutung | === Semantics / {{Deu|Bedeutung}} === | ||
{{{semantics|FIXME}}}<!-- | {{{semantics|{{FIXME}}: The element semantics are missing}}}<!-- | ||
-->{{#if:{{{intro|}}}|{{intro|{{{intro}}}}}}}{{#if:{{{depr|}}}|{{depr|{{{depr}}}}}}}<!-- | -->{{#if:{{{intro|}}}|{{intro| {{{intro}}}}}}}{{#if:{{{depr|}}}| {{depr|{{{depr}}}}}}}<!-- | ||
-->{{#if:{{{semcon|}}}|<br> <br>{{semconHint}}}}<!-- | -->{{#if:{{{semcon|}}}|<br> <br>{{semconHint}}}}<!-- | ||
-->{{#if:{{#var:interwiki}}|<br> <br>The corresponding {{rml|3}} element is {{otherlink|{{#var:interwiki}}}}.}}<!-- | -->{{#if:{{#var:interwiki{{current}}}}|<br> <br>The corresponding {{rml|3}} element is {{otherlink|{{#var:interwiki}}}}.}}<!-- | ||
-->{{#if:{{{interwiki}}}|<br> <br>The corresponding {{rml|3}} element is {{otherlink|{{{interwiki}}}}}.{{interwiki|{{{interwiki}}}}}|{{#vardefine:controlInterwiki|y}}}} | -->{{#if:{{{interwiki|}}}|<br> <br>The corresponding {{rml|3}} element is {{otherlink|{{{interwiki}}}}}.{{interwiki|{{{interwiki}}}}}|{{#vardefine:controlInterwiki|y}}}} | ||
===Attributes of {{{elementName|{{#var:autitle}}}}} / {{Deu|Attribute von | ===Attributes of {{{elementName|{{#var:autitle}}}}} / {{Deu|Attribute von {{{elementName|{{#var:autitle}}}}}}} === | ||
{{#if:{{Boolandnoteq|{{{inheritedAttributes|}}}|{{{inheritedAttributes}}}|''None''}} | {{#if:{{Boolandnoteq|{{{inheritedAttributes|}}}|{{{inheritedAttributes}}}|''None''}} | ||
|{{#if:{{Boolandnoteq|{{{ownAttributes|}}}|{{{ownAttributes}}}|''None''}} | |{{#if:{{Boolandnoteq|{{{ownAttributes|}}}|{{{ownAttributes}}}|''None''}} | ||
Line 31: | Line 32: | ||
|<!--inherited nicht-->{{#if:{{Boolandnoteq|{{{ownAttributes|}}}|{{{ownAttributes}}}|''None''}} | |<!--inherited nicht-->{{#if:{{Boolandnoteq|{{{ownAttributes|}}}|{{{ownAttributes}}}|''None''}} | ||
|<!--nur own-->{{{ownAttributes}}} | |<!--nur own-->{{{ownAttributes}}} | ||
|<!--keines-->{{#if:{{{inheritedAttributes|}}}{{{ownAttributes|}}}|''None''|''Not yet described. / {{Deu|Noch nicht beschrieben | |<!--keines-->{{#if:{{{inheritedAttributes|}}}{{{ownAttributes|}}}|''None''|''Not yet described. / {{Deu|Noch nicht beschrieben.}}''}}<!--viertes if zu-->}}<!--drittes if zu--> | ||
}}<!--erstes if zu--> | }}<!--erstes if zu--> | ||
=== Syntactic Constraints / {{Deu|Syntaktische Beschränkungen | === Syntactic Constraints / {{Deu|Syntaktische Beschränkungen}} === | ||
{{#vardefine:const|{{#ifeq:{{{ownAttributes}}}|''None''|''None''|''Not yet described. / {{Deu|Noch nicht beschrieben.}}''}}}} | |||
{{{ | {{{constraints|{{#var:const}}}}} | ||
{{#if:{{{semcon|}}}|<div id="semcon"></div> | {{#if:{{{semcon|}}}|<div id="semcon"></div> | ||
<div id="semcon"></div> | <div id="semcon"></div> | ||
===Semantic Constraints / {{deu|Semantische Beschränkungen | ===Semantic Constraints / {{deu|Semantische Beschränkungen}} === | ||
{{{semcon}}} | {{{semcon}}} | ||
}} | }} | ||
== Best practice & Examples / {{Deu|Empfohlene Anwendung & Beispiele | == Best practice & Examples / {{Deu|Empfohlene Anwendung & Beispiele}} == | ||
{{#if:{{{bestpractice|}}}|{{{bestpractice}}}|{{#if:{{{example|}}}|{{{example}}}|''Not yet described. / {{Deu|Noch nicht beschrieben | {{#if:{{{bestpractice|}}}|{{{bestpractice}}}|{{#if:{{{example|}}}|{{{example}}}|''Not yet described. / {{Deu|Noch nicht beschrieben.}}''}}}} | ||
<!--{{{bestpractice|''Not yet described. / {{Deu|Noch nicht beschrieben | <!--{{{bestpractice|''Not yet described. / {{Deu|Noch nicht beschrieben.}}''}}}--> | ||
<!-- | <!-- | ||
== Additional information / {{Deu|Zusätzliche Informationen | == Additional information / {{Deu|Zusätzliche Informationen}} == | ||
--> | --> | ||
== Notes / {{Deu|Anmerkungen}} | == Notes / {{Deu|Anmerkungen}} == | ||
{{{ | {{{notes|''Not yet described. / {{Deu|Noch nicht beschrieben.}}''}}} | ||
{{#if:{{{ref|}}}| | |||
== Open issues / {{Deu|Offene Punkte/Pendenzen | == References / {{Deu|Einzelnachweise}} == | ||
<references />}} | |||
== Open issues / {{Deu|Offene Punkte/Pendenzen}} == | |||
{{{openissues|''Not yet described. / {{Deu|Noch nicht beschrieben | {{{openissues|''Not yet described. / {{Deu|Noch nicht beschrieben.}}''}}} | ||
[[Category:{{ | [[Category:{{ | ||
Line 78: | Line 77: | ||
*Position in the XML-Tree | *Position in the XML-Tree | ||
**Parent | **Parent | ||
**Children: {{{childs|''Not yet described. / {{Deu|Noch nicht beschrieben | **Children: {{{childs|''Not yet described. / {{Deu|Noch nicht beschrieben.}}''}}} | ||
*Semantics | *Semantics | ||
*Attributes | *Attributes | ||
Line 103: | Line 102: | ||
**multi – Some comment to the multiplicity. E.g. version changes | **multi – Some comment to the multiplicity. E.g. version changes | ||
**interwiki – The corresponding {{rml|3}} element (if applicable; use carefully!). | **interwiki – The corresponding {{rml|3}} element (if applicable; use carefully!). | ||
**ref – Produces a references paragraph. Set ref=1 to display the references if applicable. | |||
*Arguments to be discontinued — '''Do not use them anymore''' | *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. | **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 | **bestpractice — use ''example'', as the paragraphs ''Best Practice'' and ''Examples'' have been merged | ||
===Dependencies=== | ===Dependencies=== | ||
The template depends on [[Template:Deu | The template depends on [[Template:Deu]]. There is abig number of templates building on Template:ElementDocu. | ||
==Example== | ==Example== | ||
<nowiki>{{ | <nowiki>{{ElementDocu|ElementName=SomeSampleElement|semantics=''This is an example. For readability reasons it is boxed.''}}</nowiki> | ||
delivers | delivers | ||
{|border="5" | {|border="5" | ||
| | |{{ElementDocu|ElementName=SomeSampleElement|semantics=''This is an example. For readability reasons it is boxed.''}} | ||
''This is an example. For readability reasons it is boxed.'' | |||
|} | |} | ||
Revision as of 14:40, 3 July 2023
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
- multi – Some comment to the multiplicity. E.g. version changes
- interwiki – The corresponding railML® 3 element (if applicable; use carefully!).
- ref – Produces a references paragraph. Set ref=1 to display the references if applicable.
- 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. There is abig number of templates building on Template:ElementDocu.
Example
{{ElementDocu|ElementName=SomeSampleElement|semantics=''This is an example. For readability reasons it is boxed.''}}
delivers
Scheme description / SchemenbeschreibungPosition of mentDocu in the XML-Tree / Position von mentDocu im XML-Baum
Multiplicity / AnzahlSemantics / BedeutungThis is an example. For readability reasons it is boxed. Attributes of mentDocu / Attribute von mentDocuNot yet described. / Noch nicht beschrieben. Syntactic Constraints / Syntaktische BeschränkungenNot yet described. / Noch nicht beschrieben. Best practice & Examples / Empfohlene Anwendung & BeispieleNot yet described. / Noch nicht beschrieben. Notes / AnmerkungenNot yet described. / Noch nicht beschrieben. Open issues / Offene Punkte/PendenzenNot yet described. / Noch nicht beschrieben. |
An example of the application of this template afield is IS:signal.