Template:InheritDClanguage: Difference between revisions

From railML 2 Wiki
Jump to navigation Jump to search
[checked revision][checked revision]
m (1 revision imported: http→https)
No edit summary
 
Line 17: Line 17:
The element {{{selfLink|FIXME}}} is intended to contain the Character Set the data belongs to. This value is of importance in case the containing Unicode names (station names a.s.o.) have to be converted into a non-Unicode-string by the reading software.
The element {{{selfLink|FIXME}}} is intended to contain the Character Set the data belongs to. This value is of importance in case the containing Unicode names (station names a.s.o.) have to be converted into a non-Unicode-string by the reading software.


This value is not to be mixed with <code><nowiki><?xml ... encoding='UTF-8' ?></nowiki></code> which defines the coding of the railML file (and all of its characters). Since a railML file is normally coded in UTF-8 the value of {{{selfLink|FIXME}}} is not necessary for pure reading. It is only necessary if the names have to be converted into a non-Unicode-string for the final target software. A reading algorithm shall not need to 'scan' the names for special characters which would mean a more empirical solution.
This value is not to be mixed with <code><nowiki><?xml ... encoding='UTF-8' ?></nowiki></code> which defines the coding of the {{rml}} file (and all of its characters). Since a {{rml}} file is normally coded in UTF-8 the value of {{{selfLink|FIXME}}} is not necessary for pure reading. It is only necessary if the names have to be converted into a non-Unicode-string for the final target software. A reading algorithm shall not need to 'scan' the names for special characters which would mean a more empirical solution.


For example, in case of <code><nowiki><dc:language>und-Grek</dc:language></nowiki></code> a reading programme could - without this statement - only recognise that there are obviously Greek names by finding high Unicode-(UTF-8-)values.
For example, in case of <code><nowiki><dc:language>und-Grek</dc:language></nowiki></code> a reading programme could - without this statement - only recognise that there are obviously Greek names by finding high Unicode-(UTF-8-)values.


Please note that for the main purpose of this element - defining the Script Character Set of the names in the railML file - it is not necessary nor usual to know a language. Most names (station names) are international and cannot be assigned to a certain language. Therefore, the language sub-tag of the BCP47 tag is often set to "und" (undefined) and only the script sub-tag is used, such as und-Latn, und-Grek, und-Arab, und-Hebr or und-Cyrl. If a writing programme does not know the script of the names it shall skip the attribute <metadata>.language.
Please note that for the main purpose of this element - defining the Script Character Set of the names in the {{rml}} file - it is not necessary nor usual to know a language. Most names (station names) are international and cannot be assigned to a certain language. Therefore, the language sub-tag of the BCP47 tag is often set to "und" (undefined) and only the script sub-tag is used, such as und-Latn, und-Grek, und-Arab, und-Hebr or und-Cyrl. If a writing programme does not know the script of the names it shall skip the attribute <metadata>.language.


A problem is that there are no BCP47 tags for the European character sets of Latin script. There is the one and only ''und-Latn'' tag to be used for several code-pages as Western Europe, Central Europe, Balic a. s. o. Therefore, a further naming of the code-page number such as
A problem is that there are no BCP47 tags for the European character sets of Latin script. There is the one and only ''und-Latn'' tag to be used for several code-pages as Western Europe, Central Europe, Balic a. s. o. Therefore, a further naming of the code-page number such as
Line 28: Line 28:


{{Deu|
{{Deu|
Das Element {{{selfLink|FIXME}}} soll den Zeichensatz angeben, in dem die Daten im schreibenden Programm vorliegen. Dieser Wert ist von Bedeutung, wenn die in der railML-Datei enthaltenen UTF-8-Zeichenketten (Bahnhofsnamen usw.) vom lesenden Programm in eine Nicht-Unicode-Zeichenkette umgewandelt werden müssen.}}
Das Element {{{selfLink|FIXME}}} soll den Zeichensatz angeben, in dem die Daten im schreibenden Programm vorliegen. Dieser Wert ist von Bedeutung, wenn die in der {{rml}}-Datei enthaltenen UTF-8-Zeichenketten (Bahnhofsnamen usw.) vom lesenden Programm in eine Nicht-Unicode-Zeichenkette umgewandelt werden müssen.}}


{{Deu|
{{Deu|
Dieser Wert ist nicht zu verwechseln mit <code><nowiki><?xml ... encoding='UTF-8' ?></nowiki></code>, welcher die Codierung der railML-Datei und damit aller enthaltener Zeichen definiert. Da eine railML-Datei normalerweise im Zeichensatz UTF-8 codiert ist, ist der Wert {{{selfLink|FIXME}}} zum reinen Auslesen der railML-Datei nicht notwendig. Er ist nur von Bedeutung, wenn die Eigennamen aus der railML-Datei im Zielprogramm in Nicht-Unicode-Zeichensätze umgewandelt werden müssen. Ein lesendes Programm soll hier nicht erst alle Eigennamen auf eventuell vorhandene Umlaute "scannen" müssen, um sich auf eher empirische Weise für einen Zeichensatz zu entscheiden. Vielmehr soll das schreibende Programm - wann immer möglich - quasi die Herkunft oder Zugehörigkeit der Namen zu einer Sprache bzw. Region angeben.}}
Dieser Wert ist nicht zu verwechseln mit <code><nowiki><?xml ... encoding='UTF-8' ?></nowiki></code>, welcher die Codierung der {{rml}}-Datei und damit aller enthaltener Zeichen definiert. Da eine {{rml}}-Datei normalerweise im Zeichensatz UTF-8 codiert ist, ist der Wert {{{selfLink|FIXME}}} zum reinen Auslesen der {{rml}}-Datei nicht notwendig. Er ist nur von Bedeutung, wenn die Eigennamen aus der {{rml}}-Datei im Zielprogramm in Nicht-Unicode-Zeichensätze umgewandelt werden müssen. Ein lesendes Programm soll hier nicht erst alle Eigennamen auf eventuell vorhandene Umlaute "scannen" müssen, um sich auf eher empirische Weise für einen Zeichensatz zu entscheiden. Vielmehr soll das schreibende Programm - wann immer möglich - quasi die Herkunft oder Zugehörigkeit der Namen zu einer Sprache bzw. Region angeben.}}


|semantics = {{{semantics|}}}
|semantics = {{{semantics|}}}

Latest revision as of 21:52, 22 January 2024


Usage

This is an Element Template. Element templates are intended to avoid routine work in railML® element documentation. These templates are very specific and are therefore documented uniformely by Template:TemplateDocu. They are collected in Category:Element Template and are based on Template:ElementDocu. They represent Template:ElementDoku with specific values and hand all other parameters through to Template:ElementDoku. If you want to use or handle an Element Template, you have to examine the code to find out, which arguments are set, and you have to be careful, because occationally arguments will be renamed, so that the use of argument names of Template ElementDoku may cause errors.

Arguments

As this is a bulk documentation, we do not explain the specific arguments of element templates.

Dependencies

As this is a bulk documentation, we do not explain the specific dependencies of element templates. You can find out, which other templates the current template supports by following this link. You can find out easily, which other templates the current template employs, as templates are included via {{doubble braces}}.

Example

As this is a bulk documentation, we do not offer specific examples of element templates. You can find in the field examples by following this link.