ebu / ebu-tt-m-xsd

1 stars 0 forks source link

Unneeded maxOccurs="1" #10

Closed spoeschel closed 5 years ago

spoeschel commented 5 years ago

The element ttm:agent specifies maxOccurs="1" for the actor child element, which is the default and should therefore be removed for readability and consistency with other attribute definitions.

nigelmegitt commented 5 years ago

Thanks @spoeschel - I'm not so sure that using the default is the best for readability. I agree we should be consistent though. Could another resolution to this be to specify maxOccurs="1" everywhere it is currently omitted?

spoeschel commented 5 years ago

Hmm, I guess always specifying maxOccurs="1" would require to also always have minOccurs="1". Both attributes would then make no more difference when catching a glimpse.

What about this: Omit both @minOccurs and @maxOccurs, if (and only if) the default cardinality (exactly one child) applies - and always specify both attributes in any other case. This way we would at least get rid of the case that sometimes exactly one of the two attributes is specified.

nigelmegitt commented 5 years ago

Yes, that could work.

nigelmegitt commented 5 years ago

I reviewed all the uses of minOccurs and maxOccurs and fixed all the files so that if either is specified as a non-default value then both are present, and pushed this in #22 for review.

spoeschel commented 5 years ago

Thank you!