Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Veratil opened this issue Oct 4, 2023 · 0 comments
Open

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

Veratil opened this issue Oct 4, 2023 · 0 comments

Comments

@Veratil
Copy link

Veratil commented Oct 4, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant