erasmus-without-paper / general-issues

An empty project for tracking issues not related to any specific project.
0 stars 1 forks source link

Use minOccurs and maxOccurs explicitly #22

Closed wrygiel closed 7 years ago

wrygiel commented 7 years ago

The default value of both minOccurs and maxOccurs is 1. In some of our XSDs we make use of this fact and skip defining these attributes.

However, this can lead to unintentional mistakes, like this one (in EMREX project). A developer may simply forget to properly fill out these attributes, because he is not required to do so when he introduces the new element.

So, it might be safer to make these attributes required in all our specs. Of course, they won't be required by the Schema, but they will be required by our own "project style guide".