-
Notifications
You must be signed in to change notification settings - Fork 41
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
Conflicting property names prevents compation #651
Comments
This is a bit of a challenge - I know in the case of security, it was a conscious decision to use an existing property name since that property name was used in a different standard. Can scoped contexts help here? It would make processing more complicated, however. A few other possible solutions:
|
I would rather avoid that as you point out it makes the processing more complicated.
FWIW, this is the "do nothing" option because with the current context, this is what you get when you compact. If you just use
I'm not a SHACL expert, but would option 4 be to use |
After some thought, I don't think scoped contexts will actually work because of inheritance: You can't know what derived classes might exist, and they would all need the correct context applied or it won't work.
Given all the examples in this repo, I don't think people actually want to write SPDX this way; I don't at least.
While this is possible, it's actually just a worse version of 3, because either way the serialized property is not going to be named what is in the Markdown files. If the tool generates a different name this is confusing for the end users as the property doesn't match the documentation; much better to have us choose a unique name so it's clear to users what is going on.
This is my preference |
This would prevent us from using properties external to the SPDX namespace - solvable by have a policy where we only use SPDX namespaced properties. @jeff-schutt - I recall we made a concious decision to use a duplicate namespace in one of our security meetings (it was probably my suggestion) to align the property name with an external standard. What do you think about renaming those properties to be unique? |
For
They are related, but not similar. Proposed PR #656 to rename:
|
Discussed on the tech call - agreed to always use namespace prefixes for all profiles using an underscore for the separator with the exception of Core (e.g. Actions:
|
Changes for AI and dataset to be unique ie. useSensitivePersonalInformation and hasSensitivePersonalInformation makes sense |
Per discussion on spdx/spdx-3-model#651, generate the JSON-LD context such that non-Core Properties and Classes are prefixed with a lower case version of the namespace + "_" (e.g. "https://rdf.spdx.org/v3/Software/File" compacts to "software_File")
Discussed with @JPEWdev and this has been resolved. |
There are a few places in the model where multiple namespaces define the same property. While RDF can handle this fine because each property path is fully qualified, it causes problems when attempting to compact a document, since the context can't map both property paths to the same non-namespaced name. The current ones I've found are:
sensitivePersonalInformation
defined in bothai
anddataset
(preferred)locator
defined in bothsecurity
andcore
(preferred)contentType
defined in bothsoftware
andcore
(preferred)The namespace listed as "preferred" is the one that currently "wins" in the context, meaning the property in the other namespace ends up requiring a prefix (e.g. "security:locator" is required to be used instead of "locator")
The text was updated successfully, but these errors were encountered: