zadean / xqerl

Erlang XQuery 3.1 Processor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

File module signatures

grantmacken opened this issue · comments

re. xqerl_expath_file module

http://expath.org/spec/file
6 System Properties

All 'System Properties' function param signatures should be 0
They are currently reading 1

eg path_separator/1
should be path_separator/0

5> xqerl_expath_file:current_dir('.').                                                                                                                                                     
 <<"/home/xqerl/">>  
6> xqerl_expath_file:line_separator().                                                                                                                                                  
 ** exception error: undefined function xqerl_expath_file:line_separator/0                                                                                                               
7> xqerl_expath_file:current_dir().                                                                                                                                                        
 ** exception error: undefined function xqerl_expath_file:current_dir/0    

Very new to this, just finding my way around
After investigation in the shell this syntax works fine

xqerl:run("file:list('.')").

close #13

close #13

Every function in xqerl that can be called from XQuery has one extra parameter. It is the current context of the query and is always the first argument. It is needed to pass the "universe" around within the various function calls. The "universe" being all in-scope namespaces, base-uri, current-dateTime, etc.