Unknown function: lazy:cache

Tuesday, 21 November 2017 · 2 messages
BD
Bridger Dyson-Smith21 Nov 2017 22:56 #

Hi Christian, et al,

In the process of reading the wiki and trying examples, I've stumbled across a problem while attempting the lazy:cache example[1]

let $f := 'lazy.txt'
let $t := lazy:cache(file:read-text($f))
return(file:delete($f), $t)

throws an error "No namespace for 'lazy:cache'." If I prepend a declare namespace lazy = "http://basex.org/modules/lazy"; to the beginning of my test file, I get an updated error: "Unknown function: Q{ http://basex.org/modules/lazy}cache". I get that same result in BaseX-latest (9.0 beta b5f1824) and v8.6.7.

Is this a bug or is this A Case of The Missing Import Module Statement? Thanks in advance for your help. Cheers, Bridger

[1] http://docs.basex.org/wiki/Lazy_Module#lazy:cache

CG
Christian Grün21 Nov 2017 23:04 #

Hi Bridger,

I see you’ve already discovered the latest changes for BaseX 9.0. I have just uploaded a new snapshot that contains the new Lazy Module.

Have fun, Christian

Quoted text · Bridger Dyson-Smith · 19 lines
> In the process of reading the wiki and trying examples, I've stumbled across > a problem while attempting the lazy:cache example[1] > > let $f := 'lazy.txt' > let $t := lazy:cache(file:read-text($f)) > return(file:delete($f), $t) > > throws an error "No namespace for 'lazy:cache'." If I prepend a `declare > namespace lazy = "http://basex.org/modules/lazy";` to the beginning of my > test file, I get an updated error: "Unknown function: > Q{http://basex.org/modules/lazy}cache". I get that same result in > BaseX-latest (9.0 beta b5f1824) and v8.6.7. > > Is this a bug or is this A Case of The Missing Import Module Statement? > Thanks in advance for your help. > Cheers, > Bridger > > [1] http://docs.basex.org/wiki/Lazy_Module#lazy:cache

⚡Generated with XQuery