Home » railML newsgroups » railml.timetable » [railML 2] New semantic constraint for <operatingPeriod>
[railML 2] New semantic constraint for <operatingPeriod> [message #3458] Wed, 12 February 2025 10:03 Go to next message
Milan Wölke is currently offline  Milan Wölke
Messages: 240
Registered: April 2007
Senior Member
Hi all,

in response to feedback from a railML partner I would like to propose the following semantic constraint for the railML 2 operatingPeriod. It basically just encodes the documented and well known practice of how to use the attribute @bitMask in a semantic constraint.

I propose the following constraint:

The length of the attribute @bitMask is defined by the number of days enclosed by the <timetablePeriod>'s @startDate and @endDate attributes. For each day either a 1 or a 0 is to be included in the @bitMask, each defining if the <operatingPeriod> is active (1) that day or not (0).

What do you think? Any objections on this? How could the wording be improved so that we dont have misunderstandings with people new to railML?

Thank you for your feedback in advance.

Best regards, Milan


Milan Hoffmann – Timetable schema coordinator
railML.org (Registry of Associations: VR 5750)
Altplauen 19h; 01187 Dresden; Germany www.railML.org

[Updated on: Wed, 12 February 2025 12:01]

Report message to a moderator

Re: [railML 2] New semantic constraint for <operatingPeriod> [message #3501 is a reply to message #3458] Mon, 10 March 2025 10:40 Go to previous messageGo to next message
Christian Rößiger is currently offline  Christian Rößiger
Messages: 85
Registered: March 2015
Member
Hello Milan,

I think a semcon for the bitmask makes sense, but I would only define the length of the bitmask in it. The explanation that 1 stands for active and 0 for inactive days is technically not verifiable in a validator and could rather be listed in the semantics section.
In the Semcon, we could also include a formal definition such as 'length of bitmask = endDate - beginDate + 1'.

Best regards
Christian
Re: [railML 2] New semantic constraint for <operatingPeriod> [message #3506 is a reply to message #3501] Tue, 11 March 2025 16:38 Go to previous message
Milan Wölke is currently offline  Milan Wölke
Messages: 240
Registered: April 2007
Senior Member
Hi Christian,

makes sense to me. So the wording for the semcon would change to:

The length of the attribute @bitMask is defined by the number of days enclosed by the <timetablePeriod>'s @startDate and @endDate attributes (length of bitmask = endDate - startDate + 1).

The description of the semantics would be moved to the semantics section of the wiki page.


Best regards, Milan


Milan Hoffmann – Timetable schema coordinator
railML.org (Registry of Associations: VR 5750)
Altplauen 19h; 01187 Dresden; Germany www.railML.org

[Updated on: Thu, 13 March 2025 10:34]

Report message to a moderator

Previous Topic: [railML2] Proposed semantic constraint for <specialService>
Next Topic: [railML2] New semantic constraint for <trainPart>
Goto Forum:
  


Current Time: Wed Nov 18 19:40:12 GMT+1 2026