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

SPDX XML doesn't reference a schema #615

Open
anthonyharrison opened this issue Jan 6, 2022 · 11 comments
Open

SPDX XML doesn't reference a schema #615

anthonyharrison opened this issue Jan 6, 2022 · 11 comments
Milestone

Comments

@anthonyharrison
Copy link

The example SPDX document in XML doesn't reference a schema and the schemas directory only contains a JSON schema. Does an XML schema exist for the XML format so that an XML formated document can then be validated against the schema.

@goneall
Copy link
Member

goneall commented Jan 6, 2022

@anthonyharrison We're looking for a volunteer to help with the XML support. Interested or know anyone who may be interested?

The JSON schema is generated from a Java OWL to JSON Schema utility. I've also written an OWL to XSD utility, but I am not confident enough in my XML knowledge to publish the results.

I would be happy to collaborate with someone more expert in XML to review and refine both the XML schema and tune up any issues with the current XML example.

@anthonyharrison
Copy link
Author

anthonyharrison commented Jan 6, 2022 via email

@goneall
Copy link
Member

goneall commented Jan 6, 2022

Thanks @anthonyharrison for the help.

I'll attach the XSD generated from the current Java utility. Perhaps you could look at it/compare it with the PyCharm generated XSD and let me know how close it is. I wouldn't be surprised if you find a few issues
spdx-schema.xsd.txt
.

@anthonyharrison
Copy link
Author

Thanks @anthonyharrison for the help.

I'll attach the XSD generated from the current Java utility. Perhaps you could look at it/compare it with the PyCharm generated XSD and let me know how close it is. I wouldn't be surprised if you find a few issues spdx-schema.xsd.txt .

@goneall I tried to validate the SPDX sample XML file with the Java generated version of the XSD and it complained that it couldn't find the document element in the schema. The PyCharm version I generated wasn't generic enough so I found another generator and used this to successfully validate the sample file.

spdx_schema2.xsd.txt

@goneall goneall added this to the 3.0 milestone Aug 11, 2022
@goneall
Copy link
Member

goneall commented Aug 11, 2022

@anthonyharrison Sorry I didn't get to this for the 2.3 release. Let's target getting an updates XSD in place for 3.0.

@zvr
Copy link
Member

zvr commented Oct 31, 2022

Older relevant issue : #217

@anthonyharrison
Copy link
Author

@goneall
Copy link
Member

goneall commented Oct 31, 2022

Thanks @anthonyharrison

@chalbersma
Copy link

Can you depreciate XML entirely instead?

@goneall
Copy link
Member

goneall commented Mar 2, 2024

Can you depreciate XML entirely instead?

We're actively discussing what serialization formats to support for SPDX 3.0. There is a significant number of tool developers who would like to only support JSON-LD which would deprecate the XML format. Feel free to participate in the serialization meetings or stay tuned to the SPDX tech minutes or mailing list.

@goneall
Copy link
Member

goneall commented Apr 4, 2024

SPDX 3.0 will only support JSON-LD - moving this to 3.1 where we will consider additional serialization formats.

@goneall goneall modified the milestones: 3.0, 3.1 Apr 4, 2024
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