I think it is the handling of nested comments:

let $a:='
(:~
 : BEFORE <code>(:~</code> MIDDLE <code>:)</code> AFTER
 :)
declare function local:foo(){42};local:foo()
 '
return inspect:xqdoc($a)

Result:
 <xqdoc:description>&lt;/code&gt; MIDDLE &lt;code&gt;</xqdoc:description>

may be confusing [1] indeed.
/Andy
[1] http://www-01.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/com.ibm.db2z11.doc.xml/src/tpc/db2z_commentxpxq.dita

On 24 March 2015 at 15:54, Christian Grün <christian.gruen@gmail.com> wrote:
Hi Andy,

I have just updated the modules.zip file; maybe the first error is gone?

  https://github.com/BaseXdb/basex-dist/blob/master/etc/modules.zip

If not, I agree something must go wrong while there must be something
wrong with parsing the description as XML.

> 2) inspect:xqdoc("array.xqm") and the same with map.xqm
>
> Function 'array:size' is in reserved namespace. I guess this is to be
> expected and maybe I should just ignore any  modules in namespaces
> http://www.w3.org/...

Exactly. Maybe we should also remove it from the zip file..

Thanks,
Christian