@@ -500,12 +500,20 @@ limitations under the License.
500
500
of the component. Examples: commons-lang3 and jquery</xs : documentation >
501
501
</xs : annotation >
502
502
</xs : element >
503
- <xs : element name =" version" type =" bom:versionType" minOccurs =" 0" maxOccurs =" 1" >
504
- <xs : annotation >
505
- <xs : documentation >The component version. The version should ideally comply with semantic versioning
506
- but is not enforced.</xs : documentation >
507
- </xs : annotation >
508
- </xs : element >
503
+ <xs : choice >
504
+ <xs : element name =" version" type =" bom:versionType" minOccurs =" 0" maxOccurs =" 1" >
505
+ <xs : annotation >
506
+ <xs : documentation >The component version. The version should ideally comply with semantic versioning
507
+ but is not enforced.</xs : documentation >
508
+ </xs : annotation >
509
+ </xs : element >
510
+ <xs : element name =" versionRange" type =" bom:versionRangeType" minOccurs =" 0" maxOccurs =" 1" >
511
+ <xs : annotation >
512
+ <xs : documentation >The component version range that may be provided to fulfill this capability.
513
+ MAY only occur if `isExtraneous` is `true`.</xs : documentation >
514
+ </xs : annotation >
515
+ </xs : element >
516
+ </xs : choice >
509
517
<xs : element name =" description" type =" xs:normalizedString" minOccurs =" 0" maxOccurs =" 1" >
510
518
<xs : annotation >
511
519
<xs : documentation >Specifies a description for the component</xs : documentation >
@@ -667,12 +675,28 @@ limitations under the License.
667
675
</xs : documentation >
668
676
</xs : annotation >
669
677
</xs : attribute >
678
+ <xs : attribute name =" isExtraneous" type =" xs:boolean" default =" false" >
679
+ <xs : annotation >
680
+ <xs : documentation >
681
+ Whether this component is extraneous.
682
+ An extraneous component is not part of an assembly, but are (expected to be) provided by the environment, regardless of the component's `scope`.
683
+ </xs : documentation >
684
+ </xs : annotation >
685
+ </xs : attribute >
670
686
<xs : anyAttribute namespace =" ##any" processContents =" lax" >
671
687
<xs : annotation >
672
688
<xs : documentation >User-defined attributes may be used on this element as long as they
673
689
do not have the same name as an existing attribute used by the schema.</xs : documentation >
674
690
</xs : annotation >
675
691
</xs : anyAttribute >
692
+ <!--
693
+ this would be formal, if the support for XSD1.1's `assert` was properly implemented
694
+ in validators and tools digesting XML.
695
+ <xs:assert id="versionRange_requires_isExtraneous_eq_true"
696
+ test="if (versionRange) then (@isExtraneous eq 'true') else true()">
697
+ child `versionRange` MAY only be present, if attribute `isExtraneous` is `true`
698
+ </xs:assert>
699
+ -->
676
700
</xs : complexType >
677
701
678
702
<xs : complexType name =" licenseType" >
0 commit comments