If you look in lib/ folder the file modules.zip contains the BaseX modules as .xqm stub files with functions marked as external.
The entry for archive:delete is shown below. At one point I am sure these *.xqm could be parsed by functions like inspect:module and inspect:xqdoc
Currently they raise errors like [XQST0045] Function '...' is in reserved namespace.

I believe were generated by scraping the wiki :)

However:
* some of these are a little out of date (at least in 9.02)
* modules.zip is not present in recent 9.1 betas

This is a shame as I hoped to use to one day use these in some kind of IDE for content assist.
(although I have hoped that for a long time without actually doing it.)

Regards
/Andy

(:~
 : Deletes entries from an <code>$archive</code> .
 : The format of <code>$entries</code> is the same as for <a href="#archive:create">archive:create</a> .
 :
 : @error bxerr:ARCH0005 the entries of the given archive cannot be modified.
 : @error bxerr:ARCH9999 archive creation failed for some other reason.
 :)
declare function archive:delete($archive as xs:base64Binary, $entries as item()*) as xs:base64Binary external;

On 17 September 2018 at 16:43, Bridger Dyson-Smith <bdysonsmith@gmail.com> wrote:
Hi all -

I was curious if there was a way to extract function signatures from BaseX. I'm currently reading through the (excellent) wiki but was curious if there was a more automated process I might be able to use. I've been trying to think of something clever with function-lookup, but I can't seem to make it dynamic based on module namespace; e.g.

```
for $fun in function-lookup(xs:QName("archive:delete"), 1)
return
  $fun
```

I may just grab the wiki and parse it :), but I'm also interested in changes between versions of the processor.

Any thoughts or suggestions would be greatly appreciated!
Best,
Bridger