|
42 | 42 | </documentation>
|
43 | 43 | </annotation>
|
44 | 44 | <all>
|
| 45 | + <element name="obsoletedBy" type="tns:obsoletedByType" /> |
45 | 46 | <element name="crossRefs" type="tns:crossRefsType" minOccurs="0" maxOccurs="1"/>
|
46 | 47 | <element name="notes" type="tns:formattedFixedTextType" minOccurs="0" maxOccurs="1"/>
|
47 | 48 | <element name="text" type="tns:formattedAltTextType" minOccurs="0" maxOccurs="1"/>
|
|
61 | 62 | </documentation>
|
62 | 63 | </annotation>
|
63 | 64 | <all>
|
| 65 | + <element name="obsoletedBy" type="tns:obsoletedByType" /> |
64 | 66 | <element name="crossRefs" type="tns:crossRefsType" minOccurs="0" maxOccurs="1"/>
|
65 | 67 | <element name="notes" type="tns:formattedFixedTextType" minOccurs="0" maxOccurs="1">
|
66 | 68 | <annotation>
|
|
165 | 167 | </element>
|
166 | 168 | </sequence>
|
167 | 169 | </complexType>
|
| 170 | + <complexType name="obsoletedByType" mixed="true"> |
| 171 | + <annotation> |
| 172 | + <documentation xml:lang="en"> |
| 173 | + <xhtml:p> |
| 174 | + <xhtml:code>obsoletedByType</xhtml:code> represents a recommended replacement for license expressions containing a given license or exception. The algorithm for determining the recommended replacement in the context of a given license expression is: |
| 175 | + </xhtml:p> |
| 176 | + <xhtml:ol> |
| 177 | + <xhtml:li>Parse the license expression to extract the short identifiers.</xhtml:li> |
| 178 | + <xhtml:li>Look up <xhtml:code>obsoletedBy</xhtml:code> entries for the short identifiers.</xhtml:li> |
| 179 | + <xhtml:li>If any <xhtml:code>obsoletedBy</xhtml:code> has an <xhtml:code>expression</xhtml:code> attribute that matches the source, the value of that <xhtml:code>obsoletedBy</xhtml:code> is the recommended replacement for that expression. Otherwise, the value of the <xhtml:code>obsoletedBy</xhtml:code> without an expression attribute is the recommended replacement for the short identifier.</xhtml:li> |
| 180 | + </xhtml:ol> |
| 181 | + <xhtml:p> |
| 182 | + For example, the expression <xhtml:code>GPL-2.0+ WITH GCC-exception-2.0</xhtml:code> could be parsed to either of the following short license identifiers: |
| 183 | + </xhtml:p> |
| 184 | + <xhtml:ul> |
| 185 | + <xhtml:li> |
| 186 | + <xhtml:p> |
| 187 | + <xhtml:code>GPL-2.0+</xhtml:code>, in which case there would be a single <xhtml:code>obsoletedBy</xhtml:code> with no <xhtml:code>expression</xhtml:code> attribute: |
| 188 | + </xhtml:p> |
| 189 | + <xhtml:p> |
| 190 | + <xhtml:code><obsoletedBy>GPL-2.0-or-later</obsoletedBy></xhtml:code> |
| 191 | + </xhtml:p> |
| 192 | + <xhtml:p> |
| 193 | + So the recommended replacement for <xhtml:code>GPL-2.0+</xhtml:code> would be <xhtml:code>GPL-2.0-or-later</xhtml:code>. |
| 194 | + </xhtml:p> |
| 195 | + </xhtml:li> |
| 196 | + <xhtml:li> |
| 197 | + <xhtml:p> |
| 198 | + <xhtml:code>GPL-2.0</xhtml:code>, in which case there would be two <xhtml:code>obsoletedBy</xhtml:code> elements: |
| 199 | + </xhtml:p> |
| 200 | + <xhtml:p> |
| 201 | + <xhtml:code><obsoletedBy>GPL-2.0-only</obsoletedBy></xhtml:code><xhtml:br/> |
| 202 | + <xhtml:code><obsoletedBy expression="GPL-2.0+">GPL-2.0-or-later</obsoletedBy></xhtml:code> |
| 203 | + </xhtml:p> |
| 204 | + <xhtml:p> |
| 205 | + The element with <xhtml:code>expression="GPL-2.0+"</xhtml:code> matches the initial license expression, so the recommended replacement for <xhtml:code>GPL-2.0+</xhtml:code> is <xhtml:code>GPL-2.0-or-later</xhtml:code>. |
| 206 | + </xhtml:p> |
| 207 | + </xhtml:li> |
| 208 | + </xhtml:ul> |
| 209 | + </documentation> |
| 210 | + </annotation> |
| 211 | + <attribute name="expression" type="string"> |
| 212 | + <annotation> |
| 213 | + <documentation xml:lang="en"> |
| 214 | + <xhtml:p> |
| 215 | + <xhtml:code>expression</xhtml:code> is the license expression which is obsoleted by the expression contained by the element. Defaults to the bare identifier. |
| 216 | + </xhtml:p> |
| 217 | + </documentation> |
| 218 | + </annotation> |
| 219 | + </attribute> |
| 220 | + </complexType> |
168 | 221 | <complexType name="altType" mixed="true">
|
169 | 222 | <annotation>
|
170 | 223 | <documentation xml:lang="en">
|
|
0 commit comments