Template:InheritIdName: Difference between revisions

From railML 2 Wiki
Jump to navigation Jump to search
[checked revision][checked revision]
mNo edit summary
No edit summary
Line 1: Line 1:
{{InheritId
<includeonly>{{InheritId
|id = {{{id|}}}
|id = {{{id|}}}
|id_de = {{{id_de|}}}
|id_de = {{{id_de|}}}
Line 17: Line 17:
|anyAttribute = {{{anyAttribute|}}}
|anyAttribute = {{{anyAttribute|}}}
|anyAttribute_de = {{{anyAttribute_de|}}}
|anyAttribute_de = {{{anyAttribute_de|}}}
}}<noinclude>[[Category:AttributeTemplate]]</noinclude>
}}</includeonly><noinclude>
==Usage==
This template displays the commented attributes ''id'', ''code'', ''name'', ''description'', ''xml:lang'' and ''xs:anyAttribute''.
===Arguments===
This template has ten optional arguments for English and German Comments on five of the six attributes:
*id and id_de
*code and code_de
*name and name_de
*description and description_de
*anyAttribute and anyAttribute_de
===Dependencies===
This template depends on [[Template:InheritId]], [[Template:Attr]], [[Template:AddAnn]], [[Template:InheritLang]] and [[Template:InheritAnyAttribute]]. There are about a dozen templates building on it, e.g. [[Template:InheritContractor]].
==Example==
<nowiki>{{InheritIdName}}</nowiki>
 
delivers (in a box)
 
{|border="1"
|{{InheritId
|id =
|id_de =
}}
 
* {{Attr|code}} {{Intro|2.1}}: This is a short string for typical, specific abbreviations, used in different systems with the same understanding. {{AddAnn|| }}
 
* {{Attr|name}} {{Intro|2.0}}: This is a short name for the current item. {{AddAnn|| }}
 
* {{Attr|description}} {{Intro|2.0}}: This is a more detailed description as addition to the short {{Attr|name}}. It shall allow a short overview or hints to the contents of this data set. {{AddAnn|| }}
 
{{InheritLang
|notes_en = This is used for defining {{Attr|name}} and {{Attr|description}}.
}}
 
{{InheritAnyAttribute
|anyAttribute =
|anyAttribute_de =
}}
|}}
 
<nowiki>{{InheritIdName
|id=English comment on id
|id_de=Deutscher Kommentar zur id
|code=English comment on code
|code_de=Deutscher Kommentar zu code
|name=English comment on name
|name_de=Deutscher Kommentar zu name
|description=English comment on description
|description_de=Deutscher Kommentar zu description
|anyAttribute=English comment on anyAttribute
|anyAttribute_de=Deutscher Kommentar zu anyAttribute
}}</nowiki>
 
delivers (in a box)
 
{|border="1"
|{{InheritId
|id = English comment on id
|id_de = Deutscher Kommentar zur id
}}
 
* {{Attr|code}} {{Intro|2.1}}: This is a short string for typical, specific abbreviations, used in different systems with the same understanding. {{AddAnn|English comment on code|Deutscher Kommentar zu code }}
 
* {{Attr|name}} {{Intro|2.0}}: This is a short name for the current item. {{AddAnn|English comment on name|Deutscher Kommentar zu name }}
 
* {{Attr|description}} {{Intro|2.0}}: This is a more detailed description as addition to the short {{Attr|name}}. It shall allow a short overview or hints to the contents of this data set. {{AddAnn|English comment on description|Deutscher Kommentar zu description }}
 
{{InheritLang
|notes_en = This is used for defining {{Attr|name}} and {{Attr|description}}.
}}
 
{{InheritAnyAttribute
|anyAttribute = English comment on anyAttribute
|anyAttribute_de = Deutscher Kommentar zu anyAttribute
}}
|}}
 
The template is emploed e.g. by [[IS:derailer]].
 
[[Category:AttributeTemplate]]</noinclude>

Revision as of 17:18, 15 February 2016

Usage

This template displays the commented attributes id, code, name, description, xml:lang and xs:anyAttribute.

Arguments

This template has ten optional arguments for English and German Comments on five of the six attributes:

  • id and id_de
  • code and code_de
  • name and name_de
  • description and description_de
  • anyAttribute and anyAttribute_de

Dependencies

This template depends on Template:InheritId, Template:Attr, Template:AddAnn, Template:InheritLang and Template:InheritAnyAttribute. There are about a dozen templates building on it, e.g. Template:InheritContractor.

Example

{{InheritIdName}}

delivers (in a box)

  • id: XML-file-wide unique, machine-interpretable identity, required for later referencing that element internally. For a detailed explanation see Dev:identities.
    XML-Datei-weit eindeutige, maschineninterpretierbare Identität, die für die spätere interne Referenzierung dieses Elements erforderlich ist. Für eine detaillierte Erklärung siehe Dev:identities.
  • code (introduced with version 2.1): This is a short string for typical, specific abbreviations, used in different systems with the same understanding.
  • name (introduced with version 2.0): This is a short name for the current item.
  • description (introduced with version 2.0): This is a more detailed description as addition to the short name. It shall allow a short overview or hints to the contents of this data set.


  • xml:lang (introduced with version 2.1): This is a unique identifier of language. It uses basically the language standard IETF BCP 47 (external link) which may be different to ISO 639-1 (external link) or ISO 639-2 (external link). For mapping hints see relation to other standards (external link).
    This is used for defining name and description.
  • xs:anyAttribute: This provides an extension point for non-railML® attributes in a foreign namespace. How to use it?

}

{{InheritIdName |id=English comment on id |id_de=Deutscher Kommentar zur id |code=English comment on code |code_de=Deutscher Kommentar zu code |name=English comment on name |name_de=Deutscher Kommentar zu name |description=English comment on description |description_de=Deutscher Kommentar zu description |anyAttribute=English comment on anyAttribute |anyAttribute_de=Deutscher Kommentar zu anyAttribute }}

delivers (in a box)

  • id: XML-file-wide unique, machine-interpretable identity, required for later referencing that element internally. For a detailed explanation see Dev:identities.
    XML-Datei-weit eindeutige, maschineninterpretierbare Identität, die für die spätere interne Referenzierung dieses Elements erforderlich ist. Für eine detaillierte Erklärung siehe Dev:identities.
    English comment on id
    Deutscher Kommentar zur id
  • code (introduced with version 2.1): This is a short string for typical, specific abbreviations, used in different systems with the same understanding.
    English comment on code
    Deutscher Kommentar zu code
  • name (introduced with version 2.0): This is a short name for the current item.
    English comment on name
    Deutscher Kommentar zu name
  • description (introduced with version 2.0): This is a more detailed description as addition to the short name. It shall allow a short overview or hints to the contents of this data set.
    English comment on description
    Deutscher Kommentar zu description


  • xml:lang (introduced with version 2.1): This is a unique identifier of language. It uses basically the language standard IETF BCP 47 (external link) which may be different to ISO 639-1 (external link) or ISO 639-2 (external link). For mapping hints see relation to other standards (external link).
    This is used for defining name and description.
  • xs:anyAttribute: This provides an extension point for non-railML® attributes in a foreign namespace. How to use it?
    English comment on anyAttribute
    Deutscher Kommentar zu anyAttribute

}

The template is emploed e.g. by IS:derailer.