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

Document the XML schema somewhere in this repository #391

Closed
wking opened this issue Feb 20, 2017 · 15 comments
Closed

Document the XML schema somewhere in this repository #391

wking opened this issue Feb 20, 2017 · 15 comments
Assignees

Comments

@wking
Copy link
Contributor

wking commented Feb 20, 2017

Also documenting more about how this project is supposed to work (e.g. what content is under which licenses? How folks should go about contributing, etc.) would be nice ;).

@bradleeedmondson
Copy link
Contributor

Thanks Trevor, those are definitely in the plans. As you may have gleaned, SPDX is in the midst of two migrations: one to GitHub (from LF-hosted git + bugzilla) and another to XML. Neither migrations are complete yet.

The XML schema isn't finalized yet (and this repo is marked not-authoritative in its readme), so it is likely the implicit schema embodied in these files will change as the schema attribute and element names are finalized. At the same time, we are working on documentation for contributors and license requestors, which we hope to have ready once the schema is stable and all the existing licenses have been imported.

You can find an overview of the XML project here:
http://wiki.spdx.org/view/Legal_Team/Templatizing/ReviewXML

And a fairly recently updated status on the XML project (with outstanding action items) here:
http://wiki.spdx.org/view/Legal_Team/Templatizing/ActionPlan

@wking
Copy link
Contributor Author

wking commented Feb 22, 2017 via email

@wking
Copy link
Contributor Author

wking commented Feb 22, 2017 via email

@goneall
Copy link
Member

goneall commented Feb 23, 2017

@wking I've been working on a draft XML schema based on the current proposed XML property and attribute names the results are documented at https://docs.google.com/document/d/1z9n44xLH2MxT576KS_AbTOBtecyl5cw6RsrrQHibQtg

If you have bandwidth and expertise in Schema definitions, I could use some help on a couple areas - just let me know.

Once I have something close, I plan to add it to the Git repository for the XML licenses under a folder "schema" with a file named "ListedLicense.xsd".

@wking
Copy link
Contributor Author

wking commented Feb 23, 2017 via email

@goneall
Copy link
Member

goneall commented Feb 23, 2017

I went ahead and pushed the schema to a new branch "schemadev". Where I got stuck was representing the license where it can contain text, bold, lists, etc in any order. I was doing some reading on the standard to see how to represent that type of structure. Very early stage attempt.

@goneall
Copy link
Member

goneall commented Feb 25, 2017

@wking I found the solution to the mixed type: https://www.w3schools.com/xml/schema_complex_mixed.asp

I'll update the schema file with a solution in the next few hours.

@goneall
Copy link
Member

goneall commented Feb 25, 2017

@wking @bradleeedmondson I just pushed a first pass at the XML schema to the schemadev branch. If you could please review and create pull requests for any improvements. There are quite a few additional restrictions we could add to the attributes and elements, but I thought it would be good to start simple.

@wking
Copy link
Contributor Author

wking commented Feb 27, 2017 via email

@goneall
Copy link
Member

goneall commented Mar 22, 2017

Back online (sorry about the delay responding)
@wking I took a look at your schema - thanks for taking a pass at this
I wasn't considering using XHTML directly, but it isn't a bad idea. I was going to just code in the specifics from the license element names and attributes.
It looks like you are using some of the current element and attribute names as opposed to the terms we are planning to move to (e.g. LicenseCollection as opposed to SPDXLicenseCollection). Other than that and th use of XHTML, I didn't see any obvious issues.

I have been testing the XSD that is pushed to the schemadev branch using the online W3C validator. I have not tested it against any licenses.
One of the challenges with testing is the current licenses are not using the correct element and attribute names. We'll need to create a test file with the updated terms per https://docs.google.com/document/d/1z9n44xLH2MxT576KS_AbTOBtecyl5cw6RsrrQHibQtg
I could do a manual update to Apache 2.0 and post it to my local repo for testing.
As far as next steps - I would suggest we decide if we want to use the XHTML notation, merge the 2 schema's and create a test license.

@wking
Copy link
Contributor Author

wking commented Mar 22, 2017 via email

@bradleeedmondson
Copy link
Contributor

We discussed this on legal call today.

Mark had mentioned DTD vs XSD, but none of us on the call know enough about XML to say one way or the other. In the end we think we're good with @goneall and @wking proceeding toward an XSD, but we can always discuss further when we finish up the current merges, do the schema conversion, and do any further cleanup.

@goneall
Copy link
Member

goneall commented Apr 14, 2017

I'm OK with DTD's, but generally XSD's are more accepted due to the XML syntax. I'll be working on the XSD next week. If anyone sees a need for a DTD representation and would like to contribute a DTD in addition to the XSD, that would be fine as well.

@goneall
Copy link
Member

goneall commented May 26, 2017

I just updated the schema file in the schemadev branch.

I also update Apache-2.0.xml to use the new schema.

I believe it is done, but I am not sure the LicenseType should have a "" child. I changed it to choice from any since the formatted text elements can occur more than once.

@wking @bradleeedmondson If you could review the schema definition and the Apache-2.0.xml in the schemadev branch.

@jlovejoy jlovejoy added this to the Immediate Release milestone Jun 8, 2017
@bradleeedmondson bradleeedmondson self-assigned this Jun 14, 2017
@goneall
Copy link
Member

goneall commented Nov 24, 2017

I'm going to close this since it was originally intended to document the fact we need a schema. This is now resolved. There are some other issues which were discussed in the comments. If there are any issues remaining, I suggest we open a separate issue to track it and make the specifics more visible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants