Hi Thomas, Sorry about the delay replying to your email. There are currently only two ways I know of for validating SPDX: - using the OWL document + RDF validation library - using the SPDX tools verification library or command line utility (https://github.com/spdx/tools) For the SPDX tools, you can execute a command line utility or call the validate method in the library. The command is simply verify with a single parameter for the file to be verified. Binaries can be downloaded from http://spdx.org/tools/spdx/consolidated-spdx-tools-and-library. See https://github.com/spdx/tools/blob/master/src/org/spdx/tools/Verify.java for a Java implementation calling the library. Let me know if you would like more details.
There are a few challenges to creating a schema for validation. SPDX supports RDF and a tag/value format. Creating a schema to validate an RDF/XML document can be a challenge since the RDF/XML generation does not preserver the order (reference W3C examples of RDF validation: http://www.w3.org/2012/12/rdf-val/SOTA). There are also a few verifications which are implemented in the SPDX Tools programmatically and may not be (easily) implemented in a schema. For example, the license expression language used to express license information for concluded licenses. Having additional validation support would be a good contribution. However, I'm not sure the schema validation would be easy given the above challenges. Thanks, Gary From: [email protected] [mailto:[email protected]] On Behalf Of Steenbergen, Thomas Sent: Monday, September 7, 2015 11:44 PM To: [email protected] Subject: SPDX document validation Hi all, I would like to validate SPDX documents and therefore I am looking for either SPDX DTD, Relax NG or XML Schema. Found the model [1] and the XML OWL Ontology File [2], did someone already create one of the above mentioned files? If none exists I happy to start work on a Relax NG one.. Regards, Thomas Steenbergen [1] http://wiki.spdx.org/view/Technical_Team/Model_2_0 [2] http://spdx.org/rdf/terms/spdx-2-0-ontology.owl.xml _______________________________________________ Spdx-tech mailing list [email protected] https://lists.spdx.org/mailman/listinfo/spdx-tech
