Home » railML newsgroups » railml.common » [railML3] Change pattern for tOtherEnumerationValue
[railML3] Change pattern for tOtherEnumerationValue [message #3557] Thu, 10 April 2025 16:56 Go to next message
Thomas Nygreen is currently offline  Thomas Nygreen
Messages: 110
Registered: March 2008
Senior Member
Dear community!

The documentation of tOtherEnumerationValue (the 'other:*' enumeration extension), both in the schema and in the wiki has been insufficient, and led to some confusion. After discussion between the coordinators, we have also decided that the pattern of at least two "word characters" is not what we want. A "word character" is any unicode character except "punctuation", "separator" and "other" characters".[1] That includes a lot more than we need, and excludes the useful separators - and _. So in railML 3.4 we will change the pattern to 'other:[A-Za-z0-9-_]{2,}', meaning 'other:' followed by at least two characters, allowing only the letters A-Z and a-z, the digits 0-9 and the separators - and _.

We cannot change the pattern in the existing versions, but we have updated the wiki documentation [2] to clarify that only letters and digits are allowed, and added a best practice recommendation to only use the letters A-Z and a-z and the digits 0-9, to stay as close to the new pattern as possible. We will also update the schema documentation in the next service releases.

[1] https://www.w3.org/TR/xmlschema11-2/#cces-mce
[2] https://wiki3.railml.org/wiki/Dev:UsingAny#New_enumeration_v alue (also mirrored to wiki2)

Best regards
Thomas Nygreen


Thomas Nygreen – Common Schema Coordinator
railML.org (Registry of Associations: VR 5750)
Altplauen 19h; 01187 Dresden; Germany www.railML.org
Re: [railML3] Change pattern for tOtherEnumerationValue [message #3797 is a reply to message #3557] Thu, 27 November 2025 14:32 Go to previous messageGo to next message
Dominik Looser is currently offline  Dominik Looser
Messages: 37
Registered: March 2020
Member
Dear Thomas

While trying out the new railML3.4 beta 2 in our exporting software, our XML validation component reports that the schema files cannot be loaded.
This appears to be caused by the regular expression introduced above:
other:[A-Za-z0-9-_]{2,}
In this form, the hyphen (-) in the character class is interpreted as a range operator, which results in a validation error. According to multiple sources ([1, [2], [3]), a hyphen inside [ ... ] must either be escaped or placed at the beginning or end of the class to be interpreted literally.
I would therefore suggest to either negate the hyphen
other:[A-Za-z0-9\-_]{2,}
or place it at the end of the brackets
other:[A-Za-z0-9_-]{2,}

Thank you in advance for looking into this.

Best regards,
Dominik Looser
trafIT solutions gmbh

[1] https://stackoverflow.com/questions/3697202/including-a-hyph en-in-a-regex-character-bracket
[2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guid e/Regular_expressions/Character_classes
[3] https://www.regular-expressions.info/charclass.html
Re: [railML3] Change pattern for tOtherEnumerationValue [message #3805 is a reply to message #3797] Tue, 02 December 2025 15:22 Go to previous messageGo to next message
Thomas Nygreen is currently offline  Thomas Nygreen
Messages: 110
Registered: March 2008
Senior Member
Dear Dominik,

Thank you for pointing out this error. I have committed a fix to escape the hyphen and also correct a spelling error in the documentation ("digits 0-1" corrected to "digits 0-9").

Best regards,
Thomas Nygreen


Thomas Nygreen – Common Schema Coordinator
railML.org (Registry of Associations: VR 5750)
Altplauen 19h; 01187 Dresden; Germany www.railML.org
Re: [railML3] Change pattern for tOtherEnumerationValue [message #3808 is a reply to message #3805] Wed, 03 December 2025 10:35 Go to previous message
Dominik Looser is currently offline  Dominik Looser
Messages: 37
Registered: March 2020
Member
Hi Thomas,

Thank you for fixing this.

Best regards,
Dominik
Previous Topic: [Ontology v0.6] Missing properties for intrinsicCoordBegin/End
Next Topic: [railVIVID 2.1] Visualisation issue
Goto Forum:
  


Current Time: Wed Feb 18 13:09:34 CET 2026