Hi,
My RBaseX client is finally stable enough to use it for real
development. All regular commands are executed without errors.
But now I am facing another problem.
In a client-session, I want to use the following function:
fn_get_words_txt <- "declare function local:cloudWords( $Veld as
xs:string) as xs:string* {
let $base := collection('IncidentRemarks/Incidents')/csv/record
let $txt := string-join( $base/*[name() = $Veld]/text(), ' ')
let $words := tokenize($txt,'(\\s|[,.!:;]|[n][b][s][p][;])+')
return ($words)};"
(Doubling the '\' in the regular expression-string is R-specific.)
Session$Execute(fn_get_words_txt) returns:
Gestopt bij , 1/8:
Onbekend commando: declare. Probeer 'help'.
Error in Session$Execute(fn_get_words_txt) : Gestopt bij , 1/8:
Onbekend commando: declare. Probeer 'help'.
fn_get_words_Query <- Session$Query(fn_get_words_txt)
fn_get_words_Query$queryObject$ExecuteQuery() returns:
Error in private$default_query_pattern(match.call()[[1]]) :
Gestopt bij ., 5/20:
[XPST0003] Expecting expression.
Since fn_get_words_txt neither represents a regular command nor a
regular function-all, I understand these errors.
Before I even start trying to implement this in my package, my question
is if it should be able to create local functions for that session?
If so, any idea how to tackle this problem? Could the problem be
genaralized to the question how a prolog can be added or changed?
Cheers,
Ben