Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of xs:extensions in the schema #162

Closed
CBenghi opened this issue May 31, 2023 · 3 comments
Closed

Use of xs:extensions in the schema #162

CBenghi opened this issue May 31, 2023 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@CBenghi
Copy link
Contributor

CBenghi commented May 31, 2023

This is a just matter of tidiness of the schema file, no substance would be changed.

In a few locations of the schema, xs:extensions use seems redundant because they do not add any data.

IDS/Development/ids.xsd

Lines 30 to 36 in 24d01a1

<xs:element name="specifications">
<xs:complexType>
<xs:complexContent>
<xs:extension base="ids:specificationsType"/>
</xs:complexContent>
</xs:complexType>
</xs:element>

IDS/Development/ids.xsd

Lines 71 to 77 in 24d01a1

<xs:element name="property" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:complexContent>
<xs:extension base="ids:propertyType"/>
</xs:complexContent>
</xs:complexType>
</xs:element>

IDS/Development/ids.xsd

Lines 113 to 121 in 24d01a1

<xs:element name="entity" minOccurs="0">
<xs:annotation>
<xs:documentation>Make sure 'Name' value of requirements entity is the same as the 'applicability' node, or a wildcard (inclusive pattern).</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base="ids:entityType"/>
</xs:complexContent>
</xs:complexType>

Also for requirements,

IDS/Development/ids.xsd

Lines 200 to 208 in 24d01a1

<xs:element name="requirements" minOccurs="0">
<xs:complexType>
<xs:complexContent>
<xs:extension base="ids:requirementsType">
<xs:attribute name="description" type="xs:string" use="optional"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>

The type is only used here, so no need to use extension, we can just add description to requirementsType.

@CBenghi CBenghi added the documentation Improvements or additions to documentation label May 31, 2023
@berlotti
Copy link
Member

I think it needs to be like this to be valid XSD.
What would be the alternative? Do you have an example?

@CBenghi
Copy link
Contributor Author

CBenghi commented Jun 19, 2023

I've added PR #170 to show the changes I'd suggest to streamline the schema.

No functional changes to the structure of the schema, just tidying up the form.

berlotti added a commit that referenced this issue Jun 20, 2023
@berlotti
Copy link
Member

merged with 4149538

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants