-
Notifications
You must be signed in to change notification settings - Fork 22
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
core:name validation error missed #96
Comments
Diagnosis: This was an issue with This Python program demonstrates the issue: import rdflib
graph_data = """\
{
"@context": {
"case-investigation": "https://ontology.caseontology.org/case/investigation/",
"kb": "http://example.org/kb/",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"uco-action": "https://ontology.unifiedcyberontology.org/uco/action/",
"uco-core": "https://ontology.unifiedcyberontology.org/uco/core/",
"uco-identity": "https://ontology.unifiedcyberontology.org/uco/identity/",
"uco-location": "https://ontology.unifiedcyberontology.org/uco/location/",
"uco-observable": "https://ontology.unifiedcyberontology.org/uco/observable/",
"uco-tool": "https://ontology.unifiedcyberontology.org/uco/tool/",
"uco-types": "https://ontology.unifiedcyberontology.org/uco/types/",
"uco-vocabulary": "https://ontology.unifiedcyberontology.org/uco/vocabulary/",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"@graph": [
{
"@id": "kb:organization-2b3b98e2-aea2-4270-876a-7f9917623cb6",
"@type": "uco-core:UcoObject",
"uco-core:name": {"@id": "Cyber Domain Ontology"}
}
]
}
"""
graph = rdflib.Graph()
graph.parse(data=graph_data, format="json-ld")
print(len(graph)) This prints As expected, the graph length becomes 2, and a SHACL validation error is triggered, if I replace this: {"@id": "Cyber Domain Ontology"} with this: {"@id": "kb:organization-2b3b98e2-aea2-4270-876a-7f9917623cb6"} |
How to handle the silent-dropping issue has been raised in rdflib Issue 2017. |
This snippet failed to trigger a validation error:
The text was updated successfully, but these errors were encountered: