diff --git a/spec/docs/advanced.md b/spec/docs/advanced.md
index 7d6bbf1..283c07b 100644
--- a/spec/docs/advanced.md
+++ b/spec/docs/advanced.md
@@ -13,7 +13,10 @@ For an old example, see [RMLFNOTC0018](https://github.com/RMLio/rml-fno-test-cas
For now, it is unclear how to handle a nested function where that nested Triples Map contains a join condition.
-```turtle "example": "use nested function"
+
+
+
+```turtle
@prefix dbo: .
@prefix grel: .
@prefix rml: .
@@ -65,13 +68,32 @@ For now, it is unclear how to handle a nested function where that nested Triples
] .
```
+
+
+
### Conditions
-Conditions are a shortcut to make RML documents more intuitive, but rely on existing FNML functionality.
+Conditions are a shortcut to make RML mappings more intuitive, but rely on existing FNML functionality.
+It is a shortcut that is applied using the `rml:condition`: an additional ExpressionMap predicate.
+To be able to use this shortcut, conforming mapping engines MUST support following functions:
+
+- isNull
+- isNotNull
+- equals
+- noEquals
+- IF
+
+
+ isNotNull and IF are defined below, rest is an excercise for the reader.
+ The actual FnO definitions are TODO.
+
+
+
+
-```turtle "example": "use condition"
+```turtle
@prefix dbo: .
-@prefix grel: .
+@prefix fns: .
@prefix rml: .
<#Person_Mapping>
@@ -79,10 +101,6 @@ Conditions are a shortcut to make RML documents more intuitive, but rely on exis
rml:subjectMap <#SubjectMap> ;
rml:predicateObjectMap <#NameMapping> .
-# Suggestion: add rml:condition predicate to expression map,
-# and conforming mapping engines MUST support following functions:
-# - isNull, isNotNull, equals, noEquals, IF
-# (isNotNull and IF are defined below, rest is an excercise for the reader)
<#NameMapping>
rml:predicate dbo:title ;
# A condition can be defined in any expression map
@@ -90,21 +108,39 @@ Conditions are a shortcut to make RML documents more intuitive, but rely on exis
# new predicate that links to a function-valued expression map,
# that function MUST return a boolean
rml:condition [
- # isNotNull(parameter: X) / definition: X != NULL ? TRUE : FALSE ;
- rml:function fns:isNotNull ;
- rml:input [
- # The parameter that is checked for NULL
- rml:parameter fns:parameter ;
- rml:inputValueMap [
- rml:reference "name"
+ rml:functionExecution [
+ # isNotNull(parameter: X) / definition: X != NULL ? TRUE : FALSE ;
+ rml:function fns:isNotNull ;
+ rml:input [
+ # The parameter that is checked for NULL
+ rml:parameter fns:parameter ;
+ rml:inputValueMap [
+ rml:reference "name"
+ ]
]
- ]
+ ] ;
+ rml:return fns:boolOut # if fno:boolOut is the first specified return, this triple can be ommitted.
] ;
# The actual expression used if the condition returns TRUE
- rml:constant "true"
+ rml:constant "[a filled in title]"
] .
+```
+
+
+This is actually a shortcut to the following
+
+
+
+```turtle
+@prefix dbo: .
+@prefix fns: .
+@prefix rml: .
+
+<#Person_Mapping>
+ rml:logicalSource <#LogicalSource> ;
+ rml:subjectMap <#SubjectMap> ;
+ rml:predicateObjectMap <#NameMappingExtended> .
-# This is actually a shortcut to the following
<#NameMappingExtended>
rml:predicate dbo:title ;
rml:objectMap [
@@ -116,11 +152,13 @@ Conditions are a shortcut to make RML documents more intuitive, but rely on exis
# = original condition function
rml:parameter fns:boolParameter ;
rml:inputValueMap [
- rml:function fns:isNotNull ;
- rml:input [
- rml:parameter fns:parameter ;
- rml:inputValueMap [
- rml:reference "name"
+ rml:functionExecution [
+ rml:function fns:isNotNull ;
+ rml:input [
+ rml:parameter fns:parameter ;
+ rml:inputValueMap [
+ rml:reference "name"
+ ]
]
]
]
@@ -128,7 +166,7 @@ Conditions are a shortcut to make RML documents more intuitive, but rely on exis
# = original expression
rml:parameter fns:expressionParameter ;
rml:inputValueMap [
- rml:constant "true"
+ rml:constant "[a filled in title]"
]
]
] ;
@@ -137,3 +175,6 @@ Conditions are a shortcut to make RML documents more intuitive, but rely on exis
# or nested functions (eg AND/OR),
# depending on what the engines support
```
+
+
+