-
Notifications
You must be signed in to change notification settings - Fork 56
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
XDS: clarify the definition of the optional attribute in relation to minOccurs for fields and groups #1514
base: main
Are you sure you want to change the base?
Conversation
…minOccurs for fields and groups
@@ -502,7 +502,8 @@ https://stackoverflow.com/a/48980995/1046449 --> | |||
<xs:attribute name="optional" use="optional" type="nx:NX_BOOLEAN" default="false" > | |||
<xs:annotation> | |||
<xs:documentation> | |||
A synonym for minOccurs=0. | |||
The value "true" is equivalent to minOccurs=0 while the value | |||
"false" is equivalent to minOccurs>0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the choices as large as minOccurs>0
? Or the only choice when false
is minOccurs=1
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the choices as large as minOccurs>0?
Yes. Any nonNegativeUnbounded greater than zero. If it is supposed to be minOccurs=1
when optional=false
then I can change that of course.
609432d
to
d6d20f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
optional is only a synonym for minOccurs=0 when optional=true.
When optional is false, this must mean the opposite so minOccurs>0 since nonNegativeUnbounded (not specifying the exact value of minOccurs, we only know it is greater than 0).