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 previous 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
 
Read Message
Read Message
Read Message
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: Mon Apr 29 06:02:29 CEST 2024