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

check if namespace can be deleted in SPDXIDs #251

Closed
meretp opened this issue Oct 25, 2022 · 4 comments
Closed

check if namespace can be deleted in SPDXIDs #251

meretp opened this issue Oct 25, 2022 · 4 comments
Labels
parser Issues related to the parser layer

Comments

@meretp
Copy link
Collaborator

meretp commented Oct 25, 2022

In many places the parsed values are split at # to delete the namespace, e.g. here. This probably originates from the rdf parser, but this is also done in the jsonyamlxml-writer. As mentioned in #247 it should be validated if the part before #really is the namespace so that this part is not blindly regarded.
Related to that it would make sense to check that the namespace is deleted while parsing the file so that only the "raw" values occur in the internal data model and it is no longer required to split values while writing.

@meretp meretp added the parser Issues related to the parser layer label Oct 25, 2022
@armintaenzertng
Copy link
Collaborator

Also, the namespace should only be discarded if it actually matches the document namespace. If it is different (i.e. referencing an external element from another document) we have to keep it.

@zvr
Copy link
Member

zvr commented Oct 27, 2022

As @armintaenzertng wrote, this is really not a validation -- it's a check to see whether the namespace can be deleted as a shorthand.

@meretp meretp changed the title validate namespace before splitting values check if namespace can be deleted in SPDXIDs Oct 27, 2022
@meretp
Copy link
Collaborator Author

meretp commented Oct 27, 2022

related to #105

@armintaenzertng
Copy link
Collaborator

This is fixed in the refactored version now found on main.

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

No branches or pull requests

3 participants