Hi Loren,

>I am looking at maybe doing some updates to the xqDoc spec and the codebase.

I have some suggestions for additions to the xqDoc schema:

1. Add optional boolean attribute 'external' to xqDoc:function and xqDoc: variable. I see the main use for this as allowing documentation to show clearly which variables can be passed in when an XQuery main module is invoked.

2.  Add additional optional children to the variable element. 
Namely: body, invoked and ref-variable.
These children are defined for functions. Declared variables can have complex code which references other elements. These changes allow the cross reference information to be complete.
 
3. Add optional attribute 'at' to import element. Maybe controversial🙂 but if it is in the source I think the doc should be able to capture it.

 I think I could get a pull request for these schema changes together in a couple of weeks if you like?

/Andy