Skip to content

Commit

Permalink
appendix-IV: Refactor the license expression appendix
Browse files Browse the repository at this point in the history
This is a large diff, but I aimed for restructuring/polishing without
changing the end result.  I did make a few minor, intentional changes:

* Extended license-id to include appendix I.3 (deprecated licenses).
  We don't want folks using these in license expressions (because
  they're deprecated), but they are valid (or we would have removed
  them instead of just deprecating them).  That means that in some
  cases the nature of a string is unclear.  For example 'GPL-1.0+'
  could be the depreacted license-id, or it could be a
  simple-expression using the non-deprecated GPL-1.0 license-id and
  the + operator.  I don't think that's a problem though, because I
  can't think of a case where the ambiguity would matter.

* I've allowed + for license-ref (it used to be only for license-id).
  There could be external licenses which offer a choice between
  only-this-version and or-later grants, and allowing + for
  license-ref makes it easier to support those licenses as they
  transition into the SPDX License List.  This isn't a big deal, but
  it avoids needing separate license-refs for the only-this-version
  and or-later grants if you need both.

* I've added explicit whitespace handling, vs. the previous version
  which just discussed it in the text.  That way the ABNF is the sole
  source of normative syntax information.

* I've added enclosed-license-expression, so consumers like the
  tag:value format can suggest/require it.  This allows for more
  precision in consumers (e.g. appendix V should be updated to require
  enclosed-license-expression), but I've left those other sections
  alone for this commit.  Ideally the tag:value line would be moved to
  a separate section that defined the tag-value format, but we don't
  have such a section yet [1].

* I've added Gary's documentation for spdx:OrLaterOperator [2];
  previously there was no way to represent the + operator in RDF/XML.

Also, it seems odd that there's no way to define an external license
exception (LicenseExceptionRef?).  But I haven't touched that in this
commit.

The RDF/XML bindings seem to have a hole around the WITH operators.
I've left a FIXME where I think we need adjustments.

The HTML comment avoids the ambiguous four-space indent after the
list.  Without the comment, it could be parsed as a code block (which
is what we want) [3] or a second paragraph of the final list entry [4]
(which is not what we want).  The HTML comment closes the list to
resolve the ambiguity.

[1]: #22 (comment)
[2]: #37 (comment)
[3]: https://daringfireball.net/projects/markdown/syntax#precode
     "To produce a code block in Markdown, simply indent every line of
     the block by at least 4 spaces or 1 tab"
[4]: https://daringfireball.net/projects/markdown/syntax#list
     "Each subsequent paragraph in a list item must be indented by
     either 4 spaces or one tab"
  • Loading branch information
wking committed Oct 20, 2017
1 parent cfa1b9d commit 9c8d189
Showing 1 changed file with 111 additions and 106 deletions.
Loading

0 comments on commit 9c8d189

Please sign in to comment.