- From: Arjohn Kampman <arjohn.kampman@aduna.biz>
- Date: Wed, 22 Feb 2006 15:46:35 +0100
- To: public-rdf-dawg-comments@w3.org
Most of the built-in calls defined in the grammar in "[57] BuiltInCall"
operate on arguments of type Expression, which includes boolean and
mathematical operations. Most of these built-in calls, however, only
produce results when operating on IRIs, literals and/or blank nodes.
IMHO, it would be better to enforce this through the grammer, preventing
people from writing expressions that are correct syntactically, but not
semantically, like "lang( 3 + 4 )" and "isBlank(?var = foo:bar)".
Changing this production rule to the following should prevent such
expressions:
FunctionOrVar ::= IRIrefOrFunction | Var
BuiltInCall ::= 'STR' '(' FunctionOrVar ')'
| 'LANG' '(' FunctionOrVar ')'
| 'LANGMATCHES' '(' FunctionOrVar ',' String ')'
| 'DATATYPE' '(' FunctionOrVar ')'
| 'BOUND' '(' Var ')'
| 'isIRI' '(' FunctionOrVar ')'
| 'isURI' '(' FunctionOrVar ')'
| 'isBLANK' '(' FunctionOrVar ')'
| 'isLITERAL' '(' FunctionOrVar ')'
| RegexExpression
RegexExpression ::= 'REGEX' '(' FunctionOrVar ',' String ( ',' String )? ')'
Considering that the spec is already in Last Call, I hope this comment
doesn't come too late.
Regards,
Arjohn
--
arjohn.kampman@aduna.biz
Aduna BV - http://aduna.biz/
Prinses Julianaplein 14-b, 3817 CS Amersfoort, The Netherlands
tel. +31-(0)33-4659987
Received on Wednesday, 22 February 2006 14:47:18 UTC