|
7 | 7 | targetNamespace="http://cyclonedx.org/schema/bom/1.0" |
8 | 8 | vc:minVersion="1.0" |
9 | 9 | vc:maxVersion="1.1" |
10 | | - version="1.0-M2"> |
| 10 | + version="1.0-RC1"> |
11 | 11 |
|
12 | 12 | <xs:import namespace="http://cyclonedx.org/schema/spdx" schemaLocation="http://cyclonedx.org/schema/spdx"/> |
13 | 13 |
|
|
32 | 32 | of the component. Examples: commons-lang3 and jquery</xs:documentation> |
33 | 33 | </xs:annotation> |
34 | 34 | </xs:element> |
35 | | - <xs:element name="version" type="bom:semver" minOccurs="1" maxOccurs="1"> |
| 35 | + <xs:element name="version" type="xs:normalizedString" minOccurs="1" maxOccurs="1"> |
36 | 36 | <xs:annotation> |
37 | | - <xs:documentation>The component version. The version should comply to the semantic versioning |
38 | | - specification.</xs:documentation> |
| 37 | + <xs:documentation>The component version. The version should ideally comply with semantic versioning |
| 38 | + but is not enforced.</xs:documentation> |
39 | 39 | </xs:annotation> |
40 | 40 | </xs:element> |
41 | 41 | <xs:element name="description" type="xs:normalizedString" minOccurs="0" maxOccurs="1"> |
|
85 | 85 | <xs:documentation>An optional copyright notice informing users of the underlying claims to copyright ownership in a published work.</xs:documentation> |
86 | 86 | </xs:annotation> |
87 | 87 | </xs:element> |
88 | | - <xs:element name="cpe" type="xs:string" minOccurs="0" maxOccurs="1"> |
| 88 | + <xs:element name="cpe" type="bom:cpe" minOccurs="0" maxOccurs="1"> |
89 | 89 | <xs:annotation> |
90 | 90 | <xs:documentation>Specifies a well-formed CPE name. See https://nvd.nist.gov/products/cpe</xs:documentation> |
91 | 91 | </xs:annotation> |
|
142 | 142 | <xs:documentation>Specifies the file hash of the component</xs:documentation> |
143 | 143 | </xs:annotation> |
144 | 144 | <xs:simpleContent> |
145 | | - <xs:extension base="xs:string"> |
| 145 | + <xs:extension base="bom:hashValue"> |
146 | 146 | <xs:attribute name="alg" type="bom:hashAlg" use="required"> |
147 | 147 | <xs:annotation> |
148 | 148 | <xs:documentation>Specifies the algorithm used to create hash</xs:documentation> |
|
191 | 191 | <xs:enumeration value="SHA3-512"/> |
192 | 192 | </xs:restriction> |
193 | 193 | </xs:simpleType> |
194 | | - |
195 | | - <xs:simpleType name="semver"> |
| 194 | + |
| 195 | + <xs:simpleType name="hashValue"> |
196 | 196 | <xs:restriction base="xs:token"> |
197 | | - <xs:pattern value="(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?"/> |
| 197 | + <xs:pattern value="([a-fA-F0-9]{32})|([a-fA-F0-9]{40})|([a-fA-F0-9]{64})|([a-fA-F0-9]{128})"/> |
| 198 | + </xs:restriction> |
| 199 | + </xs:simpleType> |
| 200 | + |
| 201 | + <xs:simpleType name="cpe"> |
| 202 | + <xs:annotation> |
| 203 | + <xs:documentation xml:lang="en"> |
| 204 | + Define the format for acceptable CPE URIs. Supports CPE 2.2 and CPE 2.3 formats. Refer to https://nvd.nist.gov/products/cpe for official specification. |
| 205 | + </xs:documentation> |
| 206 | + </xs:annotation> |
| 207 | + <xs:restriction base="xs:string"> |
| 208 | + <xs:pattern value="([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9\._\-~%]*){0,6})|(cpe:2\.3:[aho\*\-](:(((\?*|\*?)([a-zA-Z0-9\-\._]|(\\[\\\*\?!"#$$%&'\(\)\+,/:;<=>@\[\]\^`\{\|}~]))+(\?*|\*?))|[\*\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[\*\-]))(:(((\?*|\*?)([a-zA-Z0-9\-\._]|(\\[\\\*\?!"#$$%&'\(\)\+,/:;<=>@\[\]\^`\{\|}~]))+(\?*|\*?))|[\*\-])){4})"/> |
198 | 209 | </xs:restriction> |
199 | 210 | </xs:simpleType> |
200 | 211 |
|
|
0 commit comments