Skip to content

Commit 7faa304

Browse files
committed
schema/ListedLicense: Punt license and exception text into <text>
As it stands, there's not an easy way to extract the license text from the XML format without removing <crossRefs>, <notes>, <standardLicenseHeader>, and other siblings. With this change (which, if accepted, I still have to propagate into src/) we collect it in <text>, just like we already collect the header text in <standardLicenseHeader>. Also use <all> instead of <choice> for <LicenseType> children. With that, <crossRefs> could have occured multiple times, etc. With this change, it can only occur once, although the children can still appear in any order (we'd use <sequence> if we cared about child order).
1 parent ce845e1 commit 7faa304

File tree

1 file changed

+6
-20
lines changed

1 file changed

+6
-20
lines changed

schema/ListedLicense.xsd

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,38 +17,24 @@
1717
</choice>
1818
</complexType>
1919
<complexType name="ExceptionType" mixed="true">
20-
<choice minOccurs="1" maxOccurs="unbounded">
20+
<all>
2121
<element name="crossRefs" type="tns:crossRefsType" minOccurs="0" maxOccurs="1"/>
2222
<element name="notes" type="tns:formattedFixedTextType" minOccurs="0" maxOccurs="1"/>
23-
<element name="titleText" type="tns:formattedAltTextType" minOccurs="0" maxOccurs="1"/>
24-
<element name="copyrightText" type="tns:formattedAltTextType" minOccurs="0" maxOccurs="1"/>
25-
<element name="bullet" type="string"/>
26-
<element name="list" type="tns:listType"/>
27-
<element name="p" type="tns:formattedAltTextType"/>
28-
<element name="optional" type="tns:optionalType"/>
29-
<element name="alt" type="tns:altType"/>
30-
<element name="br" type="tns:emptyType"/>
31-
</choice>
23+
<element name="text" type="tns:formattedAltTextType" minOccurs="0" maxOccurs="1"/>
24+
</all>
3225
<attribute name="licenseId" type="string"/>
3326
<attribute name="isDeprecated" type="boolean"/>
3427
<attribute name="name" type="string"/>
3528
<attribute name="listVersionAdded" type="string"/>
3629
<attribute name="deprecatedVersion" type="string"/>
3730
</complexType>
3831
<complexType name="LicenseType" mixed="true">
39-
<choice minOccurs="1" maxOccurs="unbounded">
32+
<all>
4033
<element name="crossRefs" type="tns:crossRefsType" minOccurs="0" maxOccurs="1"/>
4134
<element name="notes" type="tns:formattedFixedTextType" minOccurs="0" maxOccurs="1"/>
4235
<element name="standardLicenseHeader" type="tns:formattedAltTextType" minOccurs="0" maxOccurs="1"/>
43-
<element name="titleText" type="tns:formattedAltTextType" minOccurs="0" maxOccurs="1"/>
44-
<element name="copyrightText" type="tns:formattedAltTextType" minOccurs="0" maxOccurs="1"/>
45-
<element name="bullet" type="string"/>
46-
<element name="list" type="tns:listType"/>
47-
<element name="p" type="tns:formattedAltTextType"/>
48-
<element name="optional" type="tns:optionalType"/>
49-
<element name="alt" type="tns:altType"/>
50-
<element name="br" type="tns:emptyType"/>
51-
</choice>
36+
<element name="text" type="tns:formattedAltTextType" minOccurs="0" maxOccurs="1"/>
37+
</all>
5238
<attribute name="licenseId" type="string"/>
5339
<attribute name="isOsiApproved" type="boolean"/>
5440
<attribute name="isFsfLibre" type="boolean"/>

0 commit comments

Comments
 (0)