Home » railML newsgroups » railml.common » Passing arbitrary attributes / use of "any" fields
Passing arbitrary attributes / use of "any" fields [message #2795] Tue, 20 July 2021 11:29 Go to next message
Thomas Langkamm is currently offline  Thomas Langkamm
Messages: 25
Registered: April 2019
Junior Member
I understand that the use of "any" attributes is somewhat discouraged in railML (https://wiki2.railml.org/wiki/Dev:usingAny), for good reasons. However, there is a common use case where we need additional attributes on railML objects, and I would like to see a standardized way to handle them: Pass references to external objects.

Now I'll admit that it's a bit of a "debugging" feature, but I think it is essential if we want to switch from proprietary formats to railML.

My benchmark use case here is that we want to generate a railML file from sources that has a different structures than railML. A real life example: We are currently evaluating a project where we have data (mostly IS, some IL) from 3 different importable sources and we want to create a railML file out of that. More precisely, our customer has 3 different software programs that they use, each with varying details of the infrastructure. The general idea is that we build a converter, consolidating the data into a railML file that can then be edited with an editor like RaIL-AiD. However, there will be inevitably inconsistencies in the data as the 3 sources occasionally have contradicting data. So what I would like to do is pass references to the source objects, which allows the "debugging" of these inconsistencies. This allows the end user, if she/he edits the railML file in the editor, to find the original objects in the other software.

For example, we have 2 sources for track sections (typically bounded by balises, isolations, signals or switches) that are not entirely consistent. From a software standpoint this is already difficult to translate into railML, as some of these will become tvd sections while other track sections will be joined into one netElement. (For example, 2 consecutive track sections split by a signal would become one netElement with a signal in the middle.) What I would like to do in this case is to annotate all netElements in the railML file with a list of track sections from either source, so that the software developer and later the user can verify how the source objects were mapped to railML netElements.

In short, I'd like a standardized way to add a list of external references to arbitrary railML objects. Is there any existing concept to do this?
Re: Passing arbitrary attributes / use of "any" fields [message #2809 is a reply to message #2795] Fri, 13 August 2021 11:55 Go to previous message
christian.rahmig is currently offline  christian.rahmig
Messages: 447
Registered: January 2016
Senior Member
Dear Thomas,

in terms of railML 3.x: why not making use of the <designator> element? Generally, any infrastructure object can have as many designators as needed and therefore, you may use them to link the elements with external "IDs" or "keys" as needed.

"any attributes" would not be needed in that case.

If this approach does not yet completely solve your challenge, please let us know.

Best regards

Christian Rahmig – Infrastructure scheme coordinator
railML.org (Registry of Associations: VR 5750)
Altplauen 19h; 01187 Dresden; Germany www.railML.org
Previous Topic: [all versions] Using sequences in XSD schemas
Next Topic: [railML2/3] creating a new element to describe the project metadata
Goto Forum:

Current Time: Mon Jul 22 15:33:09 CEST 2024