Dev:identities: Difference between revisions

From railML 2 Wiki
Jump to navigation Jump to search
[checked revision][checked revision]
({{mirror}})
Line 1: Line 1:
= {{rml}} Identities =
{{mirror}}
 
Very many {{rml}} elements require an {{Attr|id}} attribute of the W3C-Type {{RailMLType|tGenericID}}.
 
This has to be provided in order to enable references, that are very much used within the {{rml}} schemas.
 
On the other hand, software tools may refer to certain {{rml}} elements, that are not referred to within the {{rml}} file.
 
== Semantics ==
 
The general {{rml}} description states the following semantics for this attribute.
 
{{InheritId
|id = {{{id|}}}
|id_de = {{{id_de|}}}
}}
 
== Constraints ==
 
The general {{rml}} description states the following contraints.
 
{{InheritIdConstraints}}
 
== Export of {{rml}} files ==
 
Software tools, which create {{rml}} files, are free to define {{Attr|id}} values according to the above mentioned constraints.
 
=== Recommendation ===
 
{{rml}} recommends using generic values, e.g.
 
<pre><formation id="d2e717" name="TGV-ICE3">...</pre>
 
or serial numbers with letter prefixes, e.g.
<pre><formation id="rsf0002" name="TGV-ICE3">...</pre>
 
or [https://en.wikipedia.org/wiki/Universally_unique_identifier UUID]'s, e.g.
<pre><formation id="_f36014b1-055d-4171-91a4-2a32a3210f28" name="TGV-ICE3">...</pre>''Please note: a [https://en.wikipedia.org/wiki/Universally_unique_identifier#Nil_UUID Nil UUID] shall not be used; [https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random) UUID's Version 4] is commonly used. Due to the limitations of the ID type by www.w3.org in {{rml}} 2 the ID shall begin with a letter. Since this is not the case for all UUIDs, some tools are adding the prefix "_" before the UUID to fufil the constraints.''
 
=== Bad style ===
 
Sometimes exporting software tools create {{Attr|id}} values, that contain semantic data, like train numbers or vehicle family codes.
 
<pre><formation id="fTGV-ICE3" name="TGV-ICE3">...</pre>
 
Please use some more generic coding style in order to not invite the importing software to parse the {{Attr|id}} values!
 
=== Wrong style ===
{{note|If the semantic information is only included in the {{Attr|id}}, the importing software has to parse the {{Attr|id}} value in order to use it.
 
<pre><formation id="fTGV-ICE3">...</pre>
 
This coding style hinders interoperability!
|error}}
Please use a generic coding style for the {{Attr|id}} value. Look for appropriate {{rml}} attributes in the element and put the semantics there. Otherwise use the [[CO:usingAny#New_attributes_.28Use_of_xs:anyAttribute.29|xs:anyAttribute mechanism]].
 
The use of this '''Wrong style''' prevents certification of the export interface.
 
== Import of {{rml}} files ==
 
=== Recommendation ===
 
Software tools, which consume {{rml}} files, should take the {{Attr|id}} values only for referencing issues.
 
In case of valid {{rml}} files, no problems will occur.
 
=== Good style ===
 
In case of consuming "good or bad styled" {{Attr|id}} values the importing software provides routines for getting the semantics from better fitting attributes.
 
In case of consuming "wrong styled" {{Attr|id}} values the importing software is required to parse the attribute content for getting the semantics.
 
That way, the most robust import interface is assured.
 
=== Wrong style ===
{{note
|The importing software expects to parse the {{Attr|id}} value with a special regular expression in order to get the coded semantics.
 
That way, "good styled" {{Attr|id}} values can't be imported!
|error}}
 
The use of this '''Wrong style''' prevents certification of the import interface.
 
= Differentiation from other indications =
Many elements that come with an attribute {{attr|id}} will also have the attributes {{attr|code}}, {{attr|name}} {{attr|description}}.
*{{attr|code}}: Like {{attr|id}} it is machine readable, but a code is designed for interoperability. An id is valid within a single file. A code can be valid e.g. within a network and has to be unique within the network.
*{{attr|name}}: A short, human readable Identifier. Uniqueness is not required.
*{{attr|description}}: Human readable text that gives details. Uniqueness is not required.
{{note|Please be aware that human-readable attributes are only intended to forward simple remarks/explanations from one end-user to another end-user. They are not to be used to contain computer-processable data, nor shall it be parsed by programmes in any way. In case of semantical overlaps or discrepancies to machine processable file contents, any machine processable contents have priority over possible human interpretable contents. However, these attributes may be used to transmit complementary details to machine processable parameters.
{{deu|Bitte, berücksichtigen Sie, dass menschenlesbare Attribute nur für einfache Kommentare/Erklärungen von Endbenutzer zu Endbenutzer bestimmt sind. Sie sind nicht für maschineninterpretierbare Daten gedacht und werden nicht geparst. Im Falle semantischer Überschneidungen oder Widersprüche zu maschinenlesbaren Inhalten wird diesen der Vorzug gegenüber durch Menschen lesbaren gegeben. Allerdings können durch Menschen lesbare Felder für Ergänzungen zu maschinenlesbaren verwendet werden.}}|reminder}}
 
[[Category:GeneralDescription]]
[[category:Common Concept]]

Revision as of 20:57, 23 January 2020

🗒️ This page is mirrored from page Dev:identities in The railML® 3 wiki.
  1. REDIRECT Dev:Identities