Skip to content

Commit ef83d4f

Browse files
committed
schema/ListedLicense: Move standardLicenseHeader under text as fileGrant
Two changes here: * Rename standardLicenseHeader -> fileGrant. "License" is redundant as long as we only include these for licenses, and would be incorrect if/when we start supplying these for exceptions. "standard" is also redundant as long as we are requiring these to come from the license text itself (more on that below). "header" alone might be confused with <h1>, etc., and is about where the content shows up. fileGrant, on the other hand, is about what the content *is*. In fact, the GPL family grants are generic enough to be applied at the program level (as well as per-file), but the file-specific "fileGrant" is more specific for licenses like Apache-2.0 whose text only makes sense in a per-file context. * Make the fileGrant element a descendant of the text element (it used to be a sibling). We may restore the possibility of siblings later, but for now, the ancestor requirement makes it easy to enforce [1]: F) Standard License Header * Should only include text intended to be put in the header of source files or other files as specified in the license or license appendix when specifically delineated ... * Leave this field blank if there is no standard header as specifically defined in the license This also makes it easy to cover licenses where the license text and fileGrant are identical (e.g. the BSDs and the OFL [2]), because you can use: <text> <fileGrant> ... </fileGrant> <text> [1]: https://spdx.org/spdx-license-list/license-list-overview#fields [2]: spdx#451
1 parent 47b52aa commit ef83d4f

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

schema/ListedLicense.xsd

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
<all>
3333
<element name="crossRefs" type="tns:crossRefsType" minOccurs="0" maxOccurs="1"/>
3434
<element name="notes" type="tns:formattedFixedTextType" minOccurs="0" maxOccurs="1"/>
35-
<element name="standardLicenseHeader" type="tns:formattedAltTextType" minOccurs="0" maxOccurs="1"/>
36-
<element name="text" type="tns:formattedAltTextType" minOccurs="0" maxOccurs="1"/>
35+
<element name="text" type="tns:formattedAltFileGrantTextType" minOccurs="0" maxOccurs="1"/>
3736
</all>
3837
<attribute name="licenseId" type="string" use="required" />
3938
<attribute name="isOsiApproved" type="boolean"/>
@@ -55,19 +54,31 @@
5554
<complexType name="optionalType" mixed="true">
5655
<group ref="tns:formattedAltTextGroup" minOccurs="0" maxOccurs="unbounded"/>
5756
</complexType>
57+
<complexType name="optionalFileGrantType" mixed="true">
58+
<group ref="tns:formattedAltFileGrantTextGroup" minOccurs="0" maxOccurs="unbounded"/>
59+
</complexType>
5860
<complexType name="listType">
5961
<choice minOccurs="1" maxOccurs="unbounded">
6062
<element name="item" type="tns:formattedAltTextType"/>
6163
<element name="list" type="tns:listType"/>
6264
</choice>
6365
</complexType>
66+
<complexType name="listFileGrantType">
67+
<choice minOccurs="1" maxOccurs="unbounded">
68+
<element name="item" type="tns:formattedAltFileGrantTextType"/>
69+
<element name="list" type="tns:listFileGrantType"/>
70+
</choice>
71+
</complexType>
6472
<complexType name="emptyType"/>
6573
<complexType name="formattedFixedTextType" mixed="true">
6674
<group ref="tns:formattedFixedTextGroup" minOccurs="0" maxOccurs="unbounded"/>
6775
</complexType>
6876
<complexType name="formattedAltTextType" mixed="true">
6977
<group ref="tns:formattedAltTextGroup" minOccurs="0" maxOccurs="unbounded"/>
7078
</complexType>
79+
<complexType name="formattedAltFileGrantTextType" mixed="true">
80+
<group ref="tns:formattedAltFileGrantTextGroup" minOccurs="0" maxOccurs="unbounded"/>
81+
</complexType>
7182
<group name="formattedFixedTextGroup">
7283
<choice>
7384
<element name="p" type="tns:formattedFixedTextType" minOccurs="0" maxOccurs="unbounded"/>
@@ -90,4 +101,17 @@
90101
<element name="copyrightText" type="tns:formattedAltTextType" minOccurs="0" maxOccurs="1"/>
91102
</choice>
92103
</group>
104+
<group name="formattedAltFileGrantTextGroup">
105+
<choice>
106+
<element name="p" type="tns:formattedAltFileGrantTextType" minOccurs="0" maxOccurs="unbounded"/>
107+
<element name="bullet" type="string" minOccurs="0" maxOccurs="unbounded"/>
108+
<element name="list" type="tns:listFileGrantType" minOccurs="0" maxOccurs="unbounded"/>
109+
<element name="optional" type="tns:optionalFileGrantType" minOccurs="0" maxOccurs="unbounded"/>
110+
<element name="alt" type="tns:altType" minOccurs="0" maxOccurs="unbounded"/>
111+
<element name="br" type="tns:emptyType" minOccurs="0" maxOccurs="unbounded"/>
112+
<element name="titleText" type="tns:formattedAltTextType" minOccurs="0" maxOccurs="1"/>
113+
<element name="copyrightText" type="tns:formattedAltTextType" minOccurs="0" maxOccurs="1"/>
114+
<element name="fileGrant" type="tns:formattedAltTextType" minOccurs="0" maxOccurs="1"/>
115+
</choice>
116+
</group>
93117
</schema>

0 commit comments

Comments
 (0)