Closed BirgitBoss closed 2 years ago
Now in branch https://github.com/admin-shell-io/aas-specs/tree/draft-V3RC02-schemas no types any longer for plural - although this is best practice and was a concsious decision to introduce them in V1.0: Only then it is possible to specify that something is option and that - if existing - at minimum 1 element should be contained.
Although maxOccurs is "1" by default I would prefer to add maxOccurs explicitly.
<xs:group name="environment">
<xs:sequence>
<xs:element name="assetAdministrationShells" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="assetAdministrationShell" type="assetAdministrationShell_t" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
no types any longer for plural - although this is best practice and was a concsious decision to introduce them in V1.0 [...] Only then it is possible to specify that something is option and that - if existing - at minimum 1 element should be contained.
@BirgitBoss Please see https://github.com/aas-core-works/aas-core-meta/issues/149. Could you please write the feedback directly on that other issue? If I understood you correctly, lists should either be specified with at least one item or the XML element should not be specified at all? (Let's continue the discussion on the issue https://github.com/aas-core-works/aas-core-meta/issues/149.)
Closing the issue, since the schema could be generated with the appropriate constraint. The definition for plural sequences is not necessary.
The maxOccurs
set to 1 has been introduced in #204.
Since the types represent the lists and not the single elements in the list it is 0..1 multiplicity here (like for assets) and not 0..*