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

schema/ListedLicense: Document our XML semantics #586

Merged
merged 2 commits into from
Jan 29, 2018

Conversation

wking
Copy link
Contributor

@wking wking commented Dec 29, 2017

Using annotations. The xhtml namespace handling is from here. The reworded intro is based on our new README text. The ERE match semantics are from here. The rest of the text is mine, and in some cases (e.g. the crossRefs ordering) may be aspirational and not current.

I still have a number of types to document, but thought I'd put up the WIP PR so folks could see where I was planning to go.

Fixes #495.

@wking wking force-pushed the xml-semantics branch 2 times, most recently from be1af7e to 86fe5d8 Compare January 3, 2018 18:06
@wking wking changed the title WIP: schema/ListedLicense: Document our XML semantics schema/ListedLicense: Document our XML semantics Jan 3, 2018
@wking
Copy link
Contributor Author

wking commented Jan 3, 2018

I've pushed be1af7e86fe5d8 filling in documentation for the remaining entries. Now that I think the coverage is complete, I've removed the “WIP” from the PR title.

@wking
Copy link
Contributor Author

wking commented Jan 16, 2018

Rebased around #452 with 86fe5d85e3aa52.

Copy link
Member

@goneall goneall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent descriptions for the individual crossRefs and copyright elements. Overall, this helps add a lot of clarification to the users of the license XML format.

There are a couple change requests inline, most are legal related.

One other general recommendation would be to reference the license matching guidelines that the schema is based on somewhere in the schema annotation.

<annotation>
<documentation xml:lang="en">
<xhtml:p>
<xhtml:code>standardLicenseHeader</xhtml:code> is the license steward's recommended text for per-file license grants.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IANAL, but from what I understand the term "grant" has specific legal meaning which may not be applicable to all situations where the license header is used.

Suggest changing "grant" to "notice" or "text".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

… from what I understand the term "grant" has specific legal meaning which may not be applicable to all situations where the license header is used.

What's the distinction between “grant” and “notice”? Maybe “Copyright 2018 me. All rights reserved” would be a notice but not a grant? That's fine, but since all of these are licenses, I expect all of our suggested headers will be license grants (although those license grants may also include copyright notices).

<annotation>
<documentation xml:lang="en">
<xhtml:p>
<xhtml:code>crossRefsType</xhtml:code> is a set of URIs for the license or exception. When the license steward has a URI devoted to the license, it must be the first entry in <xhtml:code>crossRefsType</xhtml:code>. The order in which the other child elements are listed is not significant.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the order of cross references agreed to and consistent? If not, I would just leave it as a set of URI's for the license or exceptions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the order of cross references agreed to and consistent?

It seems to be pretty close. I've rebased this PR onto master and added a new commit fixing the cases that looked out of order with 5e3aa527d44198.

<annotation>
<documentation xml:lang="en">
<xhtml:p>
<xhtml:code>altType</xhtml:code> represents alternative content, where the SPDX considers several alternatives legally equivalent.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be OK, but in practice we have a lot of .+ matches which really could include text not legally equivalent. Should we include something with a little more "wiggle room" in the language? For example - "represents alternative content commonly found in the license text, where the SPDX considers typical usage of the alternative text legally equivalent."

@jlovejoy thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be OK, but in practice we have a lot of .+ matches which really could include text not legally equivalent.

I've added a warning about this in 7d44198deec602.

<annotation>
<documentation xml:lang="en">
<xhtml:p>
<xhtml:code>titleText</xhtml:code> is the title of the license/exception.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to add the titleText is always considered optional per the license matching guidelines?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to add the titleText is always considered optional per the license matching guidelines?

I don't think we need to call that out, since I'd rather move towards having distinct markup for optionality (<alt> and <optional>) and semantic meaning (e.g. <h1>). It's my understanding that spdx/tools doesn't treat <titleText> as optional at the moment, is that the case?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just checked and the tools to convert the title to optional

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I've pushed deec60248cf583 which mentions both the title-ness and optional-ness. I've filed #607 to track my proposed change.

@wking wking force-pushed the xml-semantics branch 2 times, most recently from 7d44198 to deec602 Compare January 28, 2018 23:08
Using annotations [1].  The xhtml namespace handling is from [2].  The
reworded intro is based on our new README text.  The ERE match
semantics are from [3].  The rest of the text is mine, and in some
cases (e.g. the crossRefs ordering) may be aspirational and not
current.

[1]: https://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#cAnnotations
[2]: https://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/structures.html#eg.import.html
[3]: https://spdx.org/spdx-specification-21-web-version#h.2mjng0vqrghe
@wking
Copy link
Contributor Author

wking commented Jan 28, 2018

One other general recommendation would be to reference the license matching guidelines that the schema is based on somewhere in the schema annotation.

This license is the canonical source of the schema, and the canonical source of the XML which consumes that schema. I'd rather have it be the canonical source of the schema semantics as well, in which case there is no reason to reference external matching guidelines. I'd rather have the external matching guidelines reference this documentation as the canonical source.

Also update mif-exception, which doesn't seem to have a steward, but
which had two URIs packed into a single crossRef element.
@goneall goneall merged commit 0061b49 into spdx:master Jan 29, 2018
@wking wking deleted the xml-semantics branch January 29, 2018 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants