Home » railML newsgroups » railml.timetable » [railML 3] Clarification regarding unused DistanceBasedCalculationRule element
[railML 3] Clarification regarding unused DistanceBasedCalculationRule element [message #4084] Mon, 20 July 2026 15:21 Go to next message
Ricardo Subtil is currently offline  Ricardo Subtil
Messages: 1
Registered: July 2026
Junior Member
Good afternoon!

While working on import functionality of railML 3.2 timetable schema for our software, I noticed the existence of a DistanceBasedCalculationRule element in the railML 3.2 schema. It looks to be entirely unused, but judging by its semantics, it appears to be a specialization of another rule element for followup sections and calculated reserve times, akin to the existing timeBasedRule.

We would like to use this element as is currently in the schema, since it fits our use-case nicely, without modifications necessary. When communicating calculated reserve times, we need to document the original distance based property for our software to reconstruct the information at import time. Here's an example of how we would use this element in an actual railML export:

<!-- 5 minutes -->
<reserve reserve="PT5M">
  <rule>
    <!-- 10 minutes every 100 kilometres (100000 metres) -->
    <distanceBasedRule referenceDistanceMeters="100000" supplement="PT10M" />
  </rule>
</reserve>

The only extension we would require in our software would be to allow this element to be present in the rule element. However we need some clarification if this element should be used as I described. While I believe we have a legitimate use-case for it, it was also subsequently deleted from the upcoming 3.4 version, suggesting a deprecation path.

Kind regards,
Ricardo Subtil
Re: [railML 3] Clarification regarding unused DistanceBasedCalculationRule element [message #4088 is a reply to message #4084] Thu, 06 August 2026 10:18 Go to previous message
Christian Rößiger is currently offline  Christian Rößiger
Messages: 82
Registered: March 2015
Member
Hello Ricardo,

I recall that the railML 3.2 specification was intended to support different rules for runtime reserves. Unfortunately, I cannot explain why, in the end, only one rule made it into the final version, and why this second rule element nevertheless remained in the XSD as a type definition without being used in the schema. As the current modelling of the `rule` element was explicitly designed to allow for extensions, I see no reason why a `distanceBasedRule` could not also be included in a future version of railML.

Ricardo Subtil wrote on Mon, 20 July 2026 15:21

<!-- 5 minutes -->
<reserve reserve="PT5M">
  <rule>
    <!-- 10 minutes every 100 kilometres (100000 metres) -->
    <distanceBasedRule referenceDistanceMeters="100000" supplement="PT10M" />
  </rule>
</reserve>

The only extension we would require in our software would be to allow this element to be present in the rule element. However we need some clarification if this element should be used as I described. While I believe we have a legitimate use-case for it, it was also subsequently deleted from the upcoming 3.4 version, suggesting a deprecation path.

I don't know how the rule represented by the 'distanceBaseRule' element actually works, so I'm unable to evaluate if you're using the element in the right way. In particular, it is unclear for me how distances that aren't multiples of 'referenceDistanceMeters' are handled. I would therefore suggest that you specify your rule or send us your own XML/XSD proposal and we introduce a new rule element explicitly for your needs. I'd rather not recycle something when I can't remember what it was originally intended for.

Best regards
Christian Rößiger
Previous Topic: [railML 3] LTP and STP Variants
Goto Forum:
  


Current Time: Sun Aug 09 19:16:25 CEST 2026