Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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/
57 changes: 52 additions & 5 deletions shapes/lv.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -240,15 +240,32 @@ 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 leaf expression field 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:LeafExpressionFieldShape ;
] .

rmlsh:LeafExpressionFieldShape a sh:NodeShape ;
rdfs:label "Leaf Expression Field" ;
rdfs:comment """
A leaf expression field is an expression field without nested fields.
""" ;
sh:message """
Node must have a valid rml:ExpressionField description.
""" ;
sh:node rmlsh:ExpressionFieldShape ;
sh:property [
sh:description """
A leaf expression field is an expression field without nested fields.
""" ;
sh:message """
A leaf expression field has no nested fields.
""" ;
sh:path rml:field ;
sh:maxCount 0 ;
] .

rmlsh:StructuralAnnotationShape a sh:NodeShape;
Expand Down Expand Up @@ -312,3 +329,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-10-23",
publishDate: "2025-11-20",
// if the specification's copyright date is a range of years, specify
// the start date here:
copyrightStart: "2024",
Expand Down
Loading