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
Check here for the $baseurl on where we get that info: https://github.com/openhie/openinfoman/blob/master/repo/csd_webapp_config.xq... 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
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.
You can; please have a look at the Request Module [1]. But Carl’s proposal is probably close to what you are looking for!
[1] http://docs.basex.org/wiki/Request_Module
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
Awesome! Thanks! I had searched for self, host and domain in the documentation. Apparently, I needed to search for hostname. Terminology!
On Fri, Jun 10, 2016 at 12:05 AM, Christian Grün christian.gruen@gmail.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.
You can; please have a look at the Request Module [1]. But Carl’s proposal is probably close to what you are looking for!
[1] http://docs.basex.org/wiki/Request_Module
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
basex-talk@mailman.uni-konstanz.de