CybOXProject / schemas

CybOX Schemas and Schema Development
42 stars 17 forks source link

Make NetworkPacket multiplicities consistent #282

Closed gtback closed 10 years ago

gtback commented 10 years ago

Here are the rules I used:

  1. Remove explicit maxOccurs="1" and minOccurs="1" everywhere they occur.
  2. If there is a "list" element containing exclusively multiple elements of a single other type, the "list" element itself should have minOccurs="0", but the contained element should be "1..unbounded", not "0..unbounded". In other words, the list itself is optional, but if it appears, there must be at least one object in it. Remove minOccurs="0" in this case.
  3. For the "outermost" sequence or choice in a complexType, remove minOccurs="0" if it occurs, leaving an implicit minOccurs="1". This is OK, since everything inside the sequence or choice should have minOccurs="0".
  4. Set an explicit minOccurs="0" on any other sequence or choice (i.e. those that are a sub-component of another sequence or a choice). Verify that every item of the sequence is minOccurs="0".

The purpose of the last two rules is for aesthetic reasons within oXygen.

Fixes #56