Closed GMishx closed 1 year ago
Thanks @GMishx for reporting this.
I narrowed down the issue - for some reason, the Jena library is removing the preceding 0
in 0BSD
when converting from a URI to a local name.
I'll transfer this issue over to the RDF library.
Turns out your timing is quite good - I'm just about to do a new release of the java tools and should be able to get in a fix or at least some kind of work around.
I found the issue - the Jena call implements the following function to get the local name - note that the local name cannot start with a digit:
/**
* Given an absolute URI, determine the split point between the namespace
* part and the localname part. If there is no valid localname part then the
* length of the string is returned. The algorithm tries to find the longest
* NCName at the end of the uri, not immediately preceeded by the first
* colon in the string.
* <p>
* This operation follows XML QName rules which are more complicated than
* needed for Turtle and TriG. For example, QName can't start with a digit.
*
* @param uri
* @return the index of the first character of the localname
* @see SplitIRI
*/
public static int splitNamespaceXML(String uri) {
I was using the tool to verify SPDX RDF reports generated by FOSSology. Where I noticed, the tool identifies
0BSD
asBSD
license.This causes tool to say the SPDX Document is not valid. I am attaching the file as
.txt
here to check.SPDX2_30-seconds-of-code-master.tar.gz.spdx.rdf.txt
The license is used as a
licenseConcluded
in a<spdx:File>