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

Add <obsoletedBy> to licenses and exceptions #392

Merged
merged 3 commits into from
Mar 24, 2018
Merged

Commits on Mar 24, 2018

  1. schema/ListedLicense: Add obsoletedBy to licenses and exceptions

    From [1]:
    
      As a result, a number of licenses formerly included in the SPDX
      License List have been deprecated as licenses, and correct usage
      employs the License Expression Syntax as of v2.0.
    
    So the sole reason for the deprecations seems to be "there's a better
    way to say that now".
    
    Telling people "use an expression instead" is less useful than saying
    "use this expression instead: $SOME_EXPRESSION".  This commit updates
    the schema to allow us to recommend replacements.  The recommended
    consumer algorithm is documented in the schema annotation.
    
    The maxOccurs="unbounded" value shows up in an XSD 1.1 spec example
    [2], and both minOccurs and maxOccurs must be set explicitly for
    obsoletedBy to override the defaults (1 for both attributes [3]).
    
    The presence of an obsoletedBy element is sufficient to mark a
    license/expression obsolete (as is the presence of an
    deprecatedVersion attribute), so I'm in favor of dropping isDeprecated
    to stay DRY.  However, removing isDeprecated (from this repository, we
    would still supply it in license-list-data) has proven contentious for
    reasons I don't understand.  This commit punts on the removal for now
    [4].
    
    [1]: spdx#392 (comment)
    [2]: https://www.w3.org/TR/xmlschema11-1/#all-mg
    [3]: https://www.w3.org/TR/xmlschema11-1/#declare-element
    [4]: spdx#392 (comment)
    wking committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    e7135fb View commit details
    Browse the repository at this point in the history
  2. *: Add obsoletedBy to obsolete licenses

    Taking advantage of the schema change from the previous commit.
    wking committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    a5ef633 View commit details
    Browse the repository at this point in the history
  3. *: Add <obsoletedBys> wrapping <obsoletedBy>

    The Node tests were choking with:
    
      Entity: line 65: element element: Schemas parser error : Element
      '{http://www.w3.org/2001/XMLSchema}element': Invalid value for
      maxOccurs (must be 0 or 1).
    
    which is mentioned in [1].  Despite unbounded being in the 1.0 spec,
    maxOccurs was restricted to 1 inside <all> in XSD 1.0. The
    restriction was lifted in 1.1 [2].  The backing libxml issue is [3].
    
    This commit works around the limitation by adding a wrapping
    <obsoletedBys> to mirror our existing <crossRefs> wrapping
    <crossRef>.  In both cases, the wrapper adds no useful semantics, but
    we need it to get the tests passing until we can find an XSD 1.1
    validator.
    
    [1]: albanm/node-libxml-xsd#12
    [2]: https://www.w3.org/TR/xmlschema11-1/#ch_models
    [3]: https://bugzilla.gnome.org/show_bug.cgi?id=765936
    wking committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    a6df410 View commit details
    Browse the repository at this point in the history