bitwig / dawproject

Open exchange format for DAWs
MIT License
751 stars 19 forks source link

Feature Request: Subelements don't need to be in specific order #65

Open Veratil opened 11 months ago

Veratil commented 11 months ago

Using xmllint to validate with Project.xsd and my project file (hand made to try and learn the schema), I was given validation errors when I had something like this:

<Channel ..>
  <Volume ...>
  <Pan ...>
  <Mute ...>
  <Devices>
    ...
  </Devices>
</Channel>

element Pan: Schemas validity error : Element 'Pan': This element is not expected.

When I reorganize the subelements to be in the Project.xsd defined order:

        <xs:sequence>
          <xs:element name="Devices" minOccurs="0">
          -snip-
          </xs:element>
          <xs:element name="Mute" type="boolParameter" minOccurs="0"/>
          <xs:element name="Pan" type="realParameter" minOccurs="0"/>
          <xs:element name="Sends" minOccurs="0">
          -snip-
          </xs:element>
          <xs:element name="Volume" type="realParameter" minOccurs="0"/>
        </xs:sequence>

so,

<Channel ..>
  <Devices>
    ...
  </Devices>
  <Mute ...>
  <Pan ...>
  <Volume ...>
</Channel>

I no longer receive a validation error.

I believe it would be nicer to be able to put those elements in any order. I tested wrapping the subelements in Channel with a xs:choice and it validated when I switched one channel's subelements.