Skip to content

XSD: questions about occurences #1513

@woutdenolf

Description

@woutdenolf
<xs:attribute name="minOccurs" use="optional" default="0" type="nx:nonNegativeUnbounded">
	<xs:annotation>
		<xs:documentation>
			Minimum number of times this ``group`` is allowed to be present within its
			parent group.  Note each ``group`` must have a ``name`` attribute
			that is unique among all ``group`` and ``field``
			declarations within a common parent group.
		</xs:documentation>
	</xs:annotation>
</xs:attribute>
<xs:attribute name="recommended" use="optional" type="nx:NX_BOOLEAN" default="false" >
	<xs:annotation>
		<xs:documentation>
			A synonym for optional, but with the recommendation that this
			``group`` be specified.
		</xs:documentation>
	</xs:annotation>
</xs:attribute>
<xs:attribute name="optional" use="optional" type="nx:NX_BOOLEAN" default="false" >
	<xs:annotation>
		<xs:documentation>
			A synonym for minOccurs=0.
		</xs:documentation>
	</xs:annotation>
</xs:attribute>
<xs:attribute name="maxOccurs" use="optional" type="nx:nonNegativeUnbounded">
	<xs:annotation>
		<xs:documentation>
			Maximum number of times this ``group`` is allowed to be present within its
			parent ``group``.  Note each ``group`` must have a ``name`` attribute
			that is unique among all ``group`` and ``field``
			declarations within a common parent ``group``.
		</xs:documentation>
	</xs:annotation>
</xs:attribute>
  1. maxOccurs does not have a default. So what does it mean when not provided?
  2. Does optional="true" imply minOccurs=0? Does it says something about maxOccurs?
  3. Does optional="false" imply minOccurs=1 or minOccurs>=1? Does it says something about maxOccurs?
  4. Does recommended="true" imply optional="true"?
  5. What does recommended="false" imply?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions