Home » railML newsgroups » railML.infrastructure » [railML3.4 beta4] Changed placement of sub-element elementState
[railML3.4 beta4] Changed placement of sub-element elementState [message #4118] Tue, 25 August 2026 15:03 Go to next message
Dominik Looser is currently offline  Dominik Looser
Messages: 66
Registered: March 2020
Member
Dear all,

While reviewing railML 3.4 beta4 I noticed that the placement of elementState has changed compared to railML 3.3. E.g. for LevelCrossingIS, elementState used to be placed after typeDesignator, now it is placed after name.

I have not checked all the elements, but I see the same change in several other FunctionalInfrastructure subelements as well.

Is there a specific reason for this? For backward-compatibility, I think we should keep the order of subelements as long as there are no compelling reasons to change it. Changing the order of subelements unnecessarily complicates the code of any (exporting) tool that works with several versions.

I am looking forward to your feedback.

Thank you and best regards,
Dominik Looser, trafIT solutions gmbh
Re: [railML3.4 beta4] Changed placement of sub-element elementState [message #4119 is a reply to message #4118] Tue, 25 August 2026 22:31 Go to previous messageGo to next message
Mathias Vanden Auweele is currently offline  Mathias Vanden Auweele
Messages: 180
Registered: February 2025
Location: Brussels
Senior Member
I think that this is a consequence of this gitlab https://development.railml.org/railml/version3/-/work_items/ 552 and this forum post https://www.railml.org/forum/index.php?t=msg&th=996& start=0&

Essentially by moving up the subelement 'elementState' in the extension chain of xsd, you also move it up in the list of elements.

IMO I don't really see a need to force a specific sequence of elements. Do modern xml libraries care so much about the order of elements? In that regard it would be better to consider xsd:all instead of xsd:sequence


Mathias Vanden Auweele
Railway data freelancer
https://matdata.eu
Brussels, Belgium
Re: [railML3.4 beta4] Changed placement of sub-element elementState [message #4155 is a reply to message #4119] Fri, 04 September 2026 13:53 Go to previous messageGo to next message
Thomas Nygreen is currently offline  Thomas Nygreen
Messages: 138
Registered: March 2008
Senior Member
Dear Dominik,

Mathias is correct that this is caused by generalising elementState. It is not inherited from RTM_NetEntity instead of from FunctionalInfrastructureEntity. Any extension of a type in XSD places the new elements after those inherited from the base type. There is nothing we can do about that.

@Mathias, an xsd:sequence is strictly ordered, and the order of sequences likewise. That is not something that is up to the library, it is part of the specification. Using xsd:all has other issues, the most important one being that a type containing xsd:all cannot be the base type for an extension. (It is possible in XSD 1.1, but the support for 1.1 is so lacking that it is unusable for a standard like railML.)

Best regards,
Thomas


Thomas Nygreen – Common Schema Coordinator
railML.org (Registry of Associations: VR 5750)
Altplauen 19h; 01187 Dresden; Germany www.railML.org
Re: [railML3.4 beta4] Changed placement of sub-element elementState [message #4161 is a reply to message #4155] Fri, 04 September 2026 22:48 Go to previous messageGo to next message
Mathias Vanden Auweele is currently offline  Mathias Vanden Auweele
Messages: 180
Registered: February 2025
Location: Brussels
Senior Member
Yes indeed Thomas, thank you for the answer. I wasn't aware of the limited support for XSD 1.1.

Mathias Vanden Auweele
Railway data freelancer
https://matdata.eu
Brussels, Belgium
Re: [railML3.4 beta4] Changed placement of sub-element elementState [message #4164 is a reply to message #4161] Mon, 07 September 2026 07:49 Go to previous messageGo to next message
Dominik Looser is currently offline  Dominik Looser
Messages: 66
Registered: March 2020
Member
Hi Thomas,

Thank you for the explanation.

Best regards,
Dominik
Re: [railML3.4 beta4] Changed placement of sub-element elementState [message #4171 is a reply to message #4164] Mon, 07 September 2026 15:37 Go to previous message
Thomas Nygreen is currently offline  Thomas Nygreen
Messages: 138
Registered: March 2008
Senior Member
Oh, how I wish we could use XSD 1.1. Then semantic constraints could instead be modelled in the schema using assertions and alternative typing. And improvements to how you can extend in general, improvements to xs:all (introducing xs:openContent)...

XSD 1.1 is not supported by Microsoft .NET nor by our modelling tool Sparx Enterprise Architect, among others.

Best regards,
Thomas


Thomas Nygreen – Common Schema Coordinator
railML.org (Registry of Associations: VR 5750)
Altplauen 19h; 01187 Dresden; Germany www.railML.org
Previous Topic: [railML3] New semantic constraint restricting RTM:level, IS:netElement and IS:netRelation
Next Topic: [railML3] Transporting dangerous goods
Goto Forum:
  


Current Time: Mon Nov 16 20:59:11 GMT+1 2026