Very many railML® elements require an id attribute of the W3C-Type Template:RailMLType.
This has to be provided in order to enable references, that are very much used within the railML® schemas.
On the other hand, software tools may refer to certain railML® elements, that are not referred to within the railML® file.
The general railML® description states the following semantics for this attribute.
The general railML® description states the following contraints.
Export of railML® files
Software tools, which create railML® files, are free to define id values according to the above mentioned constraints.
railML® recommends using generic values, e.g.
or serial numbers with letter prefixes, e.g.
or UUID's (on ), e.g.
Sometimes exporting software tools create id values, that contain semantic data, like names, designators, train numbers or vehicle family codes.
<operationalPoint id="op-TDM"> <name name="Tidmouth" language="en-UK"/> <designator register="_NWR" entry="TDM"/> ...
Please use some more generic coding style in order to not invite the importing software to parse the id values!
Please use a generic coding style for the id value. Look for appropriate railML® attributes in the element and put the semantics there. Otherwise use the xs:anyAttribute mechanism.
The use of this Wrong style prevents certification of the export interface.
Import of railML® files
Software tools, which consume railML® files, should take the id values only for referencing issues.
In case of valid railML® files, no problems will occur.
In case of consuming "good or bad styled" id values the importing software provides routines for getting the semantics from better fitting attributes.
In case of consuming "wrong styled" 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.
The use of this Wrong style prevents certification of the import interface.
Differentiation from other indications
Many elements that come with an attribute id will also have the child element <name>, with attributes name and description.
- name: A short, human readable Identifier. Uniqueness is not required.
- description: Human readable text that gives details. Uniqueness is not required.