On Thu, May 16, 2019 at 7:27 PM Christian Grün <christian.gruen@gmail.com> wrote:
The output of the inspect:module and inspect:xqdoc functions can be
used to generate a documentation of your source code 

Sorry, I should have been more elaborate (I wanted to keep the message short).

I am working on an XQuery mode for the Sublime Text 3 editor. For this I create content-completion snippets, that look like (sourced from the XPath functions 3.1 spec here):

<snippet><!-- array:fold-left#3 -->
      <content><![CDATA[array:fold-left(${1:\$array as array(*)}, ${2:\$zero as item()*}, ${3:\$function as function(item()*, item()*) as item()*})]]></content>
      <tabTrigger>arfl</tabTrigger>
      <scope>source.xquery</scope>
      <description>array:fold-left($array|array(*), $zero|item()*, $function|function(item()*, item()*) as item()*) item()*</description>
   </snippet>

As you hinted, it is easy to do this for my own modules by using the 'inspect' module. But how to do this for the built-in, BaseX library catalog (and that would just be the start, Saxon and eXist extensions shall be supported, too, I want to make it vendor agnostic, so to have as many people benefit from it as possible)?. The only way, I found so far, would be to read out the function signatures from the HTML table in the BaseX documentation. But after this, I need to analyze the signature. And this is where I tried to find a solution, but haven't so far. I will, however, check out the repository Loren is pointing at. Maybe I find something interesting there... :-)
 
--
Minden jót, all the best, Alles Gute,
Andreas Mixich