Template:InheritDClanguage

From railML 2 Wiki
Revision as of 21:15, 30 March 2012 by Dirk Bräuer (talk | contribs) (Example link added and parts of the example's description included into the Wiki text)
Jump to navigation Jump to search


dc:language
 


Scheme description / Schemenbeschreibung

Position of dc:language in the XML-Tree / Position von dc:language im XML-Baum

  • Parent: FIXME
  • Children: None

Multiplicity / Anzahl

[1..1]

Semantics / Bedeutung

Dublin Core definition
"A language of the resource."
Dublin Core description
"Recommended best practice is to use a controlled vocabulary such as RFC 4646."
railML® semantics
This may be used for identifying the default language of all name and description attributes in the children elements of FIXME.

If some element within the FIXME element uses a separate xml:lang attribute its local re-definition overwrites the default language setting from this high-level element.

The element <language> 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 <?xml ... encoding='UTF-8' ?> 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 <language> 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.

Das Attribut <language> 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.

Dieser Wert ist nicht zu verwechseln mit <?xml ... encoding='UTF-8' ?>, 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 <language> 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 - wannimmer möglich - quasi die Herkunft oder Zugehörigkeit der Namen zu einer Sprache bzw. Region angeben.

Attributes of dc:language / Attribute von dc:language

  • 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).
    The usage of xml:lang does not make any sense in the context of an language identifier.

Syntactic Constraints / Syntaktische Beschränkungen

The Element FIXME may occur once.
The controlled vocabulary for the element FIXME is the same as for the xml:lang attributes: IETF BCP 47. Just in case a language is being scripted in different ways, add the script identifier. (see ISO 15924 for the four-letter alphanumeric code)

Best practice & Examples / Empfohlene Anwendung & Beispiele

  <dc:language>de-CH</dc:language>
  <dc:language>de-DE</dc:language>
  <dc:language>el-Grek</dc:language>
  <dc:language>el-Latn</dc:language>

Notes / Anmerkungen

None.

Open issues / Offene Punkte/Pendenzen

Not yet described. / Noch nicht beschrieben.