Home » railML newsgroups » railml.common » [railml3.1] cleanup of empty sequences
[railml3.1] cleanup of empty sequences [message #2071] Thu, 03 January 2019 20:39 Go to next message
Thomas Nygreen JBD is currently offline  Thomas Nygreen JBD
Messages: 68
Registered: February 2017
Member
Dear all,

There are a lot of (=124) empty <sequence/>s in the 3.1-RC. They have no function, are annoying when viewing the schemas in a tree view, and they conceal bad constructs. In most cases the empty sequences can simply be removed, but in some others, the construct should also be changed.

One example:

In common3.xsd:
  <xs:element name="Metadata" type="rail3:Metadata"/>
  <xs:complexType name="Metadata">
    <xs:annotation>
      <xs:documentation>This is the top level element for file metadata information.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="dc:elementContainer">
        <xs:sequence/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>


Referenced by the subelement of <railML> in rail3ml.xsd:
      <xs:element name="metadata" type="rail3:Metadata" minOccurs="0" maxOccurs="1"/>


This is equivalent to simply:

In common3.xsd:
  <xs:element name="metadata" type="dc:elementContainer">
    <xs:annotation>
      <xs:documentation>This is the top level element for file metadata information.</xs:documentation>
    </xs:annotation>
  </xs:element>


In rail3ml.xsd (note that I also changed to the normal Salami Slice way):
      <xs:element name="metadata" ref="rail3:metadata" minOccurs="0" maxOccurs="1"/>


Best regards,
Thomas Nygreen
Railway capacity engineer
Jernbanedirektoratet
Re: [railml3.1] cleanup of empty sequences [message #2074 is a reply to message #2071] Thu, 03 January 2019 22:03 Go to previous messageGo to next message
Thomas Nygreen JBD is currently offline  Thomas Nygreen JBD
Messages: 68
Registered: February 2017
Member
An example:
https://pasteboard.co/images/HUMMq5n.jpg/download


Best regards,
Thomas Nygreen
Railway capacity engineer
Jernbanedirektoratet
Re: [railml3.1] cleanup of empty sequences [message #2093 is a reply to message #2071] Sun, 13 January 2019 16:31 Go to previous message
Vasco Paul Kolmorgen
Messages: 55
Registered: November 2004
Member
Dear Thomas,

many thanks for the attention and support of railML development.

Am 03.01.2019 um 20:39 schrieb Thomas Nygreen:
> There are a lot of (=124) empty <sequence/>s in the 3.1-RC.
> They have no function, are annoying when viewing the schemas
> in a tree view, and they conceal bad constructs. In most
> cases the empty sequences can simply be removed, but in some
> others, the construct should also be changed.

We have already opened ticket #314 (see
https://trac.railml.org/ticket/314) because of this problem and keep an
eye on it during development of Release Candidate 2 of railML 3.1. I
also added your post to the corresponding ticket.

Best regards,
--
Vasco Paul Kolmorgen - Governance Coordinator
railML.org (Registry of Associations: VR 5750)
Phone railML.org: +49 351 47582911
Altplauen 19h; 01187 Dresden; Germany www.railML.org
Previous Topic: XSD design patterns (was: Re: railML 3.x: Data Modelling Patterns)
Next Topic: [railml3.1] cleanup of unused types
Goto Forum:
  


Current Time: Fri Mar 29 06:26:07 CET 2024