Skip to content

Commit bf7c9b5

Browse files
Added optional bom-ref which is a unique identifier. Added ability to add any elements not specified in the schema as long as they are in their own namespace throughout the doc.
1 parent 279fafe commit bf7c9b5

1 file changed

Lines changed: 81 additions & 23 deletions

File tree

schema/bom-1.1-DRAFT-3.xsd

Lines changed: 81 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ limitations under the License.
4141
<xs:complexType name="componentsType">
4242
<xs:sequence minOccurs="0" maxOccurs="unbounded">
4343
<xs:element name="component" type="bom:component"/>
44+
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
45+
<xs:annotation>
46+
<xs:documentation>
47+
Allows any undeclared elements as long as the elements are placed in a different namespace.
48+
</xs:documentation>
49+
</xs:annotation>
50+
</xs:any>
4451
</xs:sequence>
4552
<xs:anyAttribute namespace="##any" processContents="lax">
4653
<xs:annotation>
@@ -49,7 +56,7 @@ limitations under the License.
4956
</xs:annotation>
5057
</xs:anyAttribute>
5158
</xs:complexType>
52-
59+
5360
<xs:complexType name="component">
5461
<xs:sequence>
5562
<xs:element name="publisher" type="xs:normalizedString" minOccurs="0" maxOccurs="1">
@@ -145,29 +152,35 @@ limitations under the License.
145152
</xs:element>
146153
<xs:element name="externalReferences" type="bom:externalReferences" minOccurs="0" maxOccurs="1">
147154
<xs:annotation>
148-
<xs:documentation>Provides the ability to document external references related to the
155+
<xs:documentation>Provides the ability to document external references related to the
149156
component or to the project the component describes.</xs:documentation>
150157
</xs:annotation>
151158
</xs:element>
152159
<xs:element name="components" minOccurs="0" maxOccurs="1">
153160
<xs:annotation>
154161
<xs:documentation>
155-
Specifies optional sub-components. This is not a dependency tree. It simply provides
156-
an optional way to group large sets of components together.
162+
Specifies optional sub-components. This is not a dependency tree. It provides a way
163+
to specify a hierarchical representation of component assemblies, similar to
164+
system -> subsystem -> parts assembly in physical supply chains.
157165
</xs:documentation>
158166
</xs:annotation>
159167
<xs:complexType>
160168
<xs:sequence minOccurs="0" maxOccurs="unbounded">
161169
<xs:element name="component" type="bom:component"/>
170+
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
171+
<xs:annotation>
172+
<xs:documentation>
173+
Allows any undeclared elements as long as the elements are placed in a different namespace.
174+
</xs:documentation>
175+
</xs:annotation>
176+
</xs:any>
162177
</xs:sequence>
163178
</xs:complexType>
164179
</xs:element>
165180
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
166181
<xs:annotation>
167182
<xs:documentation>
168-
Allows any undeclared elements in the component element as long as the element is
169-
placed in a different namespace. This may include support for digital signatures
170-
using the ds:Signature element or any other element from an external namespace.
183+
Allows any undeclared elements as long as the elements are placed in a different namespace.
171184
</xs:documentation>
172185
</xs:annotation>
173186
</xs:any>
@@ -180,6 +193,14 @@ limitations under the License.
180193
</xs:documentation>
181194
</xs:annotation>
182195
</xs:attribute>
196+
<xs:attribute name="bom-ref" type="xs:string">
197+
<xs:annotation>
198+
<xs:documentation>
199+
An optional identifier which can be used to reference the component elsewhere in the BOM.
200+
Uniqueness is enforced within all elements and children of the root-level bom element.
201+
</xs:documentation>
202+
</xs:annotation>
203+
</xs:attribute>
183204
<xs:anyAttribute namespace="##any" processContents="lax">
184205
<xs:annotation>
185206
<xs:documentation>User-defined attributes may be used on this element as long as they
@@ -213,6 +234,13 @@ limitations under the License.
213234
externalReference should also be specified for completeness.</xs:documentation>
214235
</xs:annotation>
215236
</xs:element>
237+
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
238+
<xs:annotation>
239+
<xs:documentation>
240+
Allows any undeclared elements as long as the elements are placed in a different namespace.
241+
</xs:documentation>
242+
</xs:annotation>
243+
</xs:any>
216244
</xs:sequence>
217245
</xs:complexType>
218246

@@ -269,8 +297,8 @@ limitations under the License.
269297
<xs:enumeration value="excluded">
270298
<xs:annotation>
271299
<xs:documentation>Components that are excluded provide the ability to document component usage
272-
for test and other non-runtime purposes. Excluded components are not reachable within a call
273-
graph at runtime.</xs:documentation>
300+
for test and other non-runtime purposes. Excluded components are not reachable within a call
301+
graph at runtime.</xs:documentation>
274302
</xs:annotation>
275303
</xs:enumeration>
276304
</xs:restriction>
@@ -304,7 +332,7 @@ limitations under the License.
304332
<xs:pattern value="([a-fA-F0-9]{32})|([a-fA-F0-9]{40})|([a-fA-F0-9]{64})|([a-fA-F0-9]{96})|([a-fA-F0-9]{128})"/>
305333
</xs:restriction>
306334
</xs:simpleType>
307-
335+
308336
<xs:simpleType name="encoding">
309337
<xs:restriction base="xs:string">
310338
<xs:enumeration value="base64"/>
@@ -413,7 +441,7 @@ limitations under the License.
413441
</xs:enumeration>
414442
</xs:restriction>
415443
</xs:simpleType>
416-
444+
417445
<xs:complexType name="externalReferences">
418446
<xs:annotation>
419447
<xs:documentation xml:lang="en">
@@ -457,7 +485,7 @@ limitations under the License.
457485
</xs:annotation>
458486
</xs:anyAttribute>
459487
</xs:complexType>
460-
488+
461489
<xs:complexType name="commitsType">
462490
<xs:annotation>
463491
<xs:documentation xml:lang="en">Zero or more commits can be specified.</xs:documentation>
@@ -468,14 +496,21 @@ limitations under the License.
468496
<xs:documentation xml:lang="en">Specifies an individual commit.</xs:documentation>
469497
</xs:annotation>
470498
</xs:element>
499+
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
500+
<xs:annotation>
501+
<xs:documentation>
502+
Allows any undeclared elements as long as the elements are placed in a different namespace.
503+
</xs:documentation>
504+
</xs:annotation>
505+
</xs:any>
471506
</xs:sequence>
472507
</xs:complexType>
473-
508+
474509
<xs:complexType name="commitType">
475510
<xs:sequence>
476511
<xs:element name="uid" type="xs:normalizedString" minOccurs="0" maxOccurs="1">
477512
<xs:annotation>
478-
<xs:documentation xml:lang="en">A unique identifier of the commit. This may be version control
513+
<xs:documentation xml:lang="en">A unique identifier of the commit. This may be version control
479514
specific. For example, Subversion uses revision numbers whereas git uses commit hashes.
480515
</xs:documentation>
481516
</xs:annotation>
@@ -502,9 +537,16 @@ limitations under the License.
502537
<xs:documentation xml:lang="en">The text description of the contents of the commit</xs:documentation>
503538
</xs:annotation>
504539
</xs:element>
540+
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
541+
<xs:annotation>
542+
<xs:documentation>
543+
Allows any undeclared elements as long as the elements are placed in a different namespace.
544+
</xs:documentation>
545+
</xs:annotation>
546+
</xs:any>
505547
</xs:sequence>
506548
</xs:complexType>
507-
549+
508550
<xs:complexType name="identifiableActionType">
509551
<xs:sequence>
510552
<xs:element name="timestamp" type="xs:dateTime" minOccurs="0" maxOccurs="1">
@@ -522,9 +564,16 @@ limitations under the License.
522564
<xs:documentation xml:lang="en">The email address of the individual who performed the action</xs:documentation>
523565
</xs:annotation>
524566
</xs:element>
567+
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
568+
<xs:annotation>
569+
<xs:documentation>
570+
Allows any undeclared elements as long as the elements are placed in a different namespace.
571+
</xs:documentation>
572+
</xs:annotation>
573+
</xs:any>
525574
</xs:sequence>
526575
</xs:complexType>
527-
576+
528577
<xs:complexType name="pedigreeType">
529578
<xs:annotation>
530579
<xs:documentation xml:lang="en">
@@ -549,7 +598,7 @@ limitations under the License.
549598
<xs:element name="descendants" type="bom:componentsType" minOccurs="0" maxOccurs="1">
550599
<xs:annotation>
551600
<xs:documentation xml:lang="en">Descendants are the exact opposite of ancestors. This provides a
552-
way to document all forks (and their forks) of an original or root component.
601+
way to document all forks (and their forks) of an original or root component.
553602
</xs:documentation>
554603
</xs:annotation>
555604
</xs:element>
@@ -565,7 +614,7 @@ limitations under the License.
565614
<xs:element name="commits" type="bom:commitsType" minOccurs="0" maxOccurs="1">
566615
<xs:annotation>
567616
<xs:documentation xml:lang="en">A list of zero or more commits which provide a trail describing
568-
how the component deviates from an ancestor, descendant, or variant.</xs:documentation>
617+
how the component deviates from an ancestor, descendant, or variant.</xs:documentation>
569618
</xs:annotation>
570619
</xs:element>
571620
<xs:element name="notes" type="xs:string" minOccurs="0" maxOccurs="1">
@@ -575,25 +624,30 @@ limitations under the License.
575624
</xs:documentation>
576625
</xs:annotation>
577626
</xs:element>
627+
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
628+
<xs:annotation>
629+
<xs:documentation>
630+
Allows any undeclared elements as long as the elements are placed in a different namespace.
631+
</xs:documentation>
632+
</xs:annotation>
633+
</xs:any>
578634
</xs:sequence>
579635
</xs:complexType>
580-
636+
581637
<xs:element name="bom">
582638
<xs:complexType>
583639
<xs:sequence>
584640
<xs:element name="components" type="bom:componentsType"/>
585641
<xs:element name="externalReferences" type="bom:externalReferences" minOccurs="0" maxOccurs="1">
586642
<xs:annotation>
587-
<xs:documentation>Provides the ability to document external references related to the BOM or
643+
<xs:documentation>Provides the ability to document external references related to the BOM or
588644
to the project the BOM describes.</xs:documentation>
589645
</xs:annotation>
590646
</xs:element>
591647
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
592648
<xs:annotation>
593649
<xs:documentation>
594-
Allows any undeclared elements in the component element as long as the element is
595-
placed in a different namespace. This may include support for digital signatures
596-
using the ds:Signature element or any other element from an external namespace.
650+
Allows any undeclared elements as long as the elements are placed in a different namespace.
597651
</xs:documentation>
598652
</xs:annotation>
599653
</xs:any>
@@ -622,5 +676,9 @@ limitations under the License.
622676
</xs:annotation>
623677
</xs:anyAttribute>
624678
</xs:complexType>
679+
<xs:unique name="bom-ref">
680+
<xs:selector xpath=".//*"/>
681+
<xs:field xpath="@bom-ref"/>
682+
</xs:unique>
625683
</xs:element>
626684
</xs:schema>

0 commit comments

Comments
 (0)