Skip to content

[Defect]: XML schema incorrectly restricts several ModelCard.Considerations list fields to a single entry #737

@wiebe-vandendriessche

Description

@wiebe-vandendriessche

Describe the defect

Multiple list fields in the ModelCard definition for CycloneDX 1.5, 1.6, and 1.7 are incorrectly constrained in the XML schema. The elements users, useCases, technicalLimitations, and performanceTradeoffs all have maxOccurs="1" on both the parent element and the child element, which restricts them to a single value.

In the JSON schema, these same fields are defined as arrays. This matches their plural naming and the accompanying documentation.

The XML definitions for the fields listed above appear to be incorrect. They should allow multiple entries, consistent with the JSON schemas.

(Other list fields in the ModelCard definition, such as performanceMetrics, graphics, datasets, inputs, outputs, ethicalConsiderations, and fairnessAssessments, correctly allow multiple entries in both XML and JSON)

Additional context

Example from the XML schema illustrating the issue:

<xs:element name="users" minOccurs="0" maxOccurs="1">
    <xs:complexType>
        <xs:sequence>
            <xs:element name="user" type="xs:string" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>
</xs:element>

<xs:element name="useCases" minOccurs="0" maxOccurs="1">
    <xs:complexType>
        <xs:sequence>
            <xs:element name="useCase" type="xs:string" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>
</xs:element>

<xs:element name="technicalLimitations" minOccurs="0" maxOccurs="1">
    <xs:complexType>
        <xs:sequence>
            <xs:element name="technicalLimitation" type="xs:string" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>
</xs:element>

<xs:element name="performanceTradeoffs" minOccurs="0" maxOccurs="1">
    <xs:complexType>
        <xs:sequence>
            <xs:element name="performanceTradeoff" type="xs:string" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>
</xs:element>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions