Re: [railML3] References across several XML files [message #2180 is a reply to message #2173] |
Tue, 16 April 2019 20:52 |
christian.rahmig
Messages: 470 Registered: January 2016
|
Senior Member |
|
|
Dear Jörg, dear all,
Am 13.04.2019 um 04:12 schrieb Joerg von Lingen:
> [...] What is your opinion on the topic of references?
I think that we have to distinguish different types of references:
(1) references that are used only inside one railML file
(2) references from inside a file to "something" outside
(3) references from "something" outside to an element inside a file
For (1), ID/IDREF seems to be the best solution, because an XML scheme
validator can check for corrupt references (e.g. missing destinations or
double IDs).
For (2) and (3), we need "external IDs" and "external references". I
propose to define new attributes of type xs:string in order to allow for
any kind of ID or reference. Using UUIDs or GUIDs might be helpful (e.g.
when adressing data stored in data bases), but there are also cases,
where the external ID or reference shall be very simple.
Following this approach the railML model need to be modified only a
little bit:
* ID can remain like it is today
* apart from the IDREF based reference, a new (external) reference of
type xs:string shall be added.
You may ask: why don't you use the <designator>?
My answer: an element shall have only on ID that can be used for
adressing the element, but it may have an arbitrary number of
designators in different registers.
Best regards
Christian
--
Christian Rahmig - Infrastructure scheme coordinator
railML.org (Registry of Associations: VR 5750)
Phone Coordinator: +49 173 2714509; railML.org: +49 351 47582911
Altplauen 19h; 01187 Dresden; Germany www.railml.org
Christian Rahmig – Infrastructure scheme coordinator
railML.org (Registry of Associations: VR 5750)
Altplauen 19h; 01187 Dresden; Germany www.railML.org
|
|
|