Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
venv
*__pycache__
test-cases/burp.jar
**/node_modules/
70 changes: 65 additions & 5 deletions shapes/lv.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -240,17 +240,47 @@ rmlsh:LogicalViewJoinShape a sh:NodeShape ;
A field of the logical view join.
""" ;
sh:message """
At least one rml:field property must be specified for a rml:LogicalViewJoin, with a resource as its value.
At least one rml:field property must be specified for a rml:LogicalViewJoin, with a reference-valued expression field without nested fields as its value.
""" ;
sh:path rml:field ;
sh:minCount 1 ;
sh:nodeKind sh:BlankNodeOrIRI ;
sh:or (
[ sh:node rmlsh:ExpressionFieldShape ]
[ sh:node rmlsh:IterableFieldShape ]
)
sh:node rmlsh:JoinFieldShape ;
] .

rmlsh:JoinFieldShape a sh:NodeShape ;
rdfs:label "Field in Logical View Join" ;
rdfs:comment """
Each logical view join has one rml:field property must be specified for a rml:LogicalViewJoin, with a reference-valued expression field without nested fields as its value, here reference as join field .
""" ;
sh:message """
Node must have a valid rml:ExpressionField description, with exactly one rml:reference property and without rml:field properties.
""" ;
sh:node rmlsh:ExpressionFieldShape ;
sh:property [
sh:description """
Nested fields are not allowed in a join field.
""" ;
sh:message """
A field in a logical view join MUST not have nested fields.
""" ;
sh:path rml:field ;
sh:maxCount 0 ;
] ;
sh:property [
sh:description """
Each join field has exactly one rml:reference property.
""" ;
sh:message """
The value of a rml:reference property for a join field must be a logical view reference that can be evaluated on the parent logical view.
""" ;
sh:path rml:reference ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:nodeKind sh:Literal ;
] .


rmlsh:StructuralAnnotationShape a sh:NodeShape;
rdfs:label "StructuralAnnotation" ;
rdfs:comment """
Expand Down Expand Up @@ -312,3 +342,33 @@ rmlsh:InclusionAnnotationShape a sh:NodeShape;
sh:maxCount 1 ;
sh:nodeKind sh:BlankNodeOrIRI ;
] .

rmlsh:parentCyclesShape a sh:NodeShape ;
sh:targetSubjectsOf rml:viewOn ;
sh:targetSubjectsOf rml:field ;
sh:sparql [
a sh:SPARQLConstraint ;
sh:message "There must be no cycles via rml:viewOn or rml:Field." ;
sh:select """
PREFIX rml: <http://w3id.org/rml/>
SELECT ?this
WHERE {
?this (rml:viewOn|rml:field)+ ?this .
}
""" ;
] .

rmlsh:joinCyclesShape a sh:NodeShape ;
sh:targetSubjectsOf rml:viewOn ;
sh:sparql [
a sh:SPARQLConstraint ;
sh:message "There must be no cycles via rml:viewOn and rml:leftJoin or rml:innerJoin." ;
sh:select """
PREFIX rml: <http://w3id.org/rml/>
SELECT ?this
WHERE {
?this a rml:LogicalView .
?this ((rml:leftJoin|rml:innerJoin)/rml:parentLogicalView)+ ?this .
}
""" ;
] .
7 changes: 6 additions & 1 deletion shapes/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ def test_validation_rules(self, path: str) -> None:
rules test cases.
"""
print(f'Testing validation with: {path}')
self._validate_rules(path)
if 'RMLLVTC0008a' in path or 'RMLLVTC0008b' in path or \
'RMLLVTC0008c' in path or 'RMLLVTC0008d' in path:
with self.assertRaises(Exception):
self._validate_rules(path)
else:
self._validate_rules(path)


if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion spec/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var respecConfig = {
// formal title, define it here
// subtitle : "White Paper",
// if you wish the publication date to be other than the last modification, set this
publishDate: "2025-09-24",
publishDate: "2025-11-13",
// if the specification's copyright date is a range of years, specify
// the start date here:
copyrightStart: "2024",
Expand Down
Loading