References across several XML files [message #2173] |
Sat, 13 April 2019 04:12 |
Jörg von Lingen
Messages: 91 Registered: March 2016
|
Member |
|
|
Dear all,
during the conference in Linz the question about references in railML3.x was
raised. Currently the referencing in IS-IL is using the ID/IDREF mechanism of
XML or alternatively UUIDs. At least the first option can be validated only,
when reference and target are within the same XML file. However, in future
scenarios only parts of the information will be exchanged, e.g. a new timetable
will not repeat the complete infrastructure but needs referencing into it.
Thus the option of using the <designator> element available at
FunctionalInfrastructureEntity and EntityIL instead. When using an official
register the name shall be unique in the register. However, it may appear at
least twice when used for IS part and IL part, e.g. signalIS/designator and
signalIL/designator.
There is another issue with using designator as it has two mandatory attributes
@register and @entry. Thus a reference to designator shall be always contain the
complete tuple of @register and @entry to be unambiguous.
What is your opinion on the topic of references?
--
Best regards,
Joerg v. Lingen - Interlocking Coordinator
|
|
|
Re: References across several XML files [message #2175 is a reply to message #2173] |
Mon, 15 April 2019 23:35 |
Thomas Nygreen JBD
Messages: 68 Registered: February 2017
|
Member |
|
|
Dear Jörg,
dear all,
I believe that the inclusion of UUIDs as possible IDs and references and the general application of the designator concept are important improvements in railML 3.1 over railML 2.x. Furthermore I believe we should establish a best practice on when and how to use which method. I will add some more thoughts on that after Easter. I encourage the community to post yout views on Jörg's question.
Best regards,
Thomas Nygreen - Common coordinator
Best regards,
Thomas Nygreen
Railway capacity engineer
Jernbanedirektoratet
|
|
|
Re: [railML3] References across several XML files [message #2180 is a reply to message #2173] |
Tue, 16 April 2019 20:52 |
christian.rahmig
Messages: 465 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
|
|
|
|
Re: [railML3] References across several XML files [message #2203 is a reply to message #2199] |
Mon, 10 June 2019 14:32 |
Martin Karlsson
Messages: 14 Registered: October 2016
|
Junior Member |
|
|
Dear all,
I agree with Jörg that there should be only one place to define references and IDs. I think we will not always know beforehand whether a reference will be of type 1, 2 or 3. It will be different in different applications.
My suggestion would be to expand the pattern of tID and tRef. They are currently defined as unions, allowing either a UUID or an xs:ID/xs:IDREF. With a third option of type xs:string, we would cover all options.
I guess a problem could then be that a misspelled UUID or an unmatched IDREF would slip through the XML validation by being identified as a string? So there would in effect be no type check at all. But that can also be seen as a consequence of allowing external references - we can not rely on the XML parser to validate the references anymore.
As you can see, this suggestion is rather incomplete. I hope someone else will pick up the thread!
Best Regards,
Martin
-------------------------
Martin Karlsson
Bombardier Transportation
Rail Control Solutions
EAPD/ECC
S-405 02 Göteborg, Sweden
Visiting address: Polhemsplatsen 5
Tel.: +46 70 6667615
martinkarlsson(at)railbombardiercom
|
|
|
Re: [railML3] References across several XML files [message #2245 is a reply to message #2203] |
Mon, 02 September 2019 12:39 |
christian.rahmig
Messages: 465 Registered: January 2016
|
Senior Member |
|
|
Dear all,
I put the (so far collected) conclusions of this discussion into a Trac
ticket [1]. Please let us know if something is missing.
[1] https://trac.railml.org/ticket/363
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
|
|
|
|