bitwig / dawproject

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

Documentation/Schema mismatch for Note's channel attribute requirement #63

Open Veratil opened 11 months ago

Veratil commented 11 months ago

Project.xsd has <Note channel=...> as a required attribute, but the documentation states it's not required since the code has it defined as not required.

I believe the schema is wrong and we really don't want channel as a required attribute (and I'd prefer it not required 🙂).

kurasu commented 11 months ago

You are correct, it should not be required. It seems the Jakarta library used to generate the XSD from the Java code always makes it required unless it's an object type. In the source it was explicitly set to be optional.

/** MIDI channel of this note. */ @XmlAttribute(required = false) public int channel;