Formal parameters of templates are not supported in list operators
Trying to instantiate the template
@prefix ex: <http://example.com#ns> .
@prefix ax: <http://tpl.ottr.xyz/owl/axiom/0.1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
ex:intersect[owl:Class ?A,
owl:Class ?B,
owl:Class ?intersection] :: {
ax:EquivObjectIntersectionOf(?intersection, (?A, ?B))
} .
results in the error messages
[ERROR] Syntax error at line 9 col 47: mismatched input '?A' expecting {'[', '(', ')', 'none', BooleanLiteral, String, IRIREF, PNAME_NS, PNAME_LN, BLANK_NODE_LABEL, INTEGER, DECIMAL, DOUBLE}
[ERROR] Syntax error at line 9 col 54: extraneous input ')' expecting {',', '}'}
Introducing blank nodes for the formal parameters ?A
and ?B
results in a successful instantiation of the modified template, i.e.
@prefix ex: <http://example.com#ns> .
@prefix ax: <http://tpl.ottr.xyz/owl/axiom/0.1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
ex:intersect[owl:Class ?A,
owl:Class ?B,
owl:Class ?intersection] :: {
ax:EquivalentClass(_:b1, ?A) ,
ax:EquivalentClass(_:b2, ?B) ,
ax:EquivObjectIntersectionOf(?intersection, (_:b1, _:b2))
} .
However, such auxiliary blank nodes appear as named classes, e.g. "Error1" and "Error2", when the instantiated template is loaded in protege.