Wrong namespace for the EXPath HTTP Client function?
Sunday, 30 October 2011 · 3 messages
FG
Florent Georges30 Oct 2011 00:57 #
Hi,
The following query:
import module namespace http = "http://expath.org/ns/http-client";
http:send-request(
<http:request href="http://google.com/" method="get"/>)returns the following error:
Error: [XQST0059] Unknown module for namespace
"http://expath.org/ns/http-client".
The following one though is successful (even though it is not correct according to the HTTP Client spec) (note the element namespace and the function namespace are different):
import module namespace http = "http://expath.org/ns/http";
declare namespace h = "http://expath.org/ns/http-client";
http:send-request(
<h:request href="http://google.com/" method="get"/>) Regards,
--
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/
CG
Christian Grün30 Oct 2011 15:26 #
Quoted text · Florent Georges · 11 lines
> The following query: > > import module namespace http = "http://expath.org/ns/http-client"; > > http:send-request( > <http:request href="http://google.com/" method="get"/>) > > returns the following error: > > Error: [XQST0059] Unknown module for namespace > "http://expath.org/ns/http-client".
Thanks, this is now fixed..
http://files.basex.org/releases/latest/
We had used an obsolete namespace
("http://expath.org/ns/http-client"). More feedback is welcome ;) Christian
FG
Florent Georges30 Oct 2011 18:01 #
Christian Grün wrote
Hi,
Quoted text · Christian Grün · 2 lines
> Thanks, this is now fixed.. > http://files.basex.org/releases/latest/
Great! I've tested it and it works fine.
Quoted text · Christian Grün · 2 lines
> We had used an obsolete namespace > ("http://expath.org/ns/http-client").
Just to make it clear: this one is not obsolete, this is the right one, as you fixed it in the preview build above :-)
Quoted text · Christian Grün · 1 line
> More feedback is welcome ;)
Good to know :-D Regards,
--
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/
Written for BaseX 7.0. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery