Check here for the $baseurl on where we get that info:
https://github.com/openhie/openinfoman/blob/master/repo/csd_webapp_config.xqm
One problem is that if you are sitting behind a proxy, you will get something that is not resolvable.  To this end we built in our debian packaging the ability to overwrite this "configuration" module.

Let me know if you want more details.

Cheers,
-carl

On Jun 9, 2016 6:36 PM, "France Baril" <france.baril@architextus.com> wrote:
When I'm in xquery and I need to reference something through the rest interface. Can I  know from xquery my host/port or domain, or do I have to leave that information for myself somewhere in a config file.

Case:
  • I keep an indexable version my .xsd in a DB so I can query it to provide guidance to users in the GUI.
  • Validation won't work with my .xsd because it won't resolve the includes if I just open the main .xsd file.
  • I keep a binary copy of my .xsd in a different DB so I can reference it though rest and therefore validate content, but I need to know my base url. So far I've been leaving that information in a config file that I query, but as I have multiple BaseX instances in implies that I enter my host:port in .basex and then again in my indexable config file. 
I'm trying to reduce duplication here.

Thanks,

France

--
France Baril
Architecte documentaire / Documentation architect
france.baril@architextus.com