public final static String HTTP_NS_PREFIX = "http";
public final static String HTTP_NS_URI = "http://expath.org/ns/http";
public final static String HTTP_CLIENT_NS_PREFIX = "hc";
public final static String HTTP_CLIENT_NS_URI = "http://expath.org/ns/http-client";
The HTTP Client 1.0 spec makes no mention of the hc prefix or the http://expath.org/ns/http URI. From the section on Namespace Conventions, at http://expath.org/spec/http-client#d2e70:
The module defined by this document does define one function in the namespace http://expath.org/ns/http-client. In this document, the http prefix, when used, is bound to this namespace URI.
The disadvantage of the expath-http-client-java's use of hc and this 2nd namespace URI absent from the spec is that eXist doesn't recognize the http prefix for the function described in the spec as "http:send-request()". For example, inspect:inspect-module-uri(xs:anyURI("http://expath.org/ns/http-client")) returns module/@prefix="hc". This isn't inherently an eXist problem; eXist merely uses the reference implementation, https://github.com/fgeorges/expath-http-client-java.
In https://github.com/fgeorges/expath-http-client-java/blob/master/http-client-java/src/org/expath/httpclient/HttpConstants.java#L19-L22, 2 namespaces are defined for the EXPath HTTP Client:
The HTTP Client 1.0 spec makes no mention of the
hc
prefix or thehttp://expath.org/ns/http
URI. From the section on Namespace Conventions, at http://expath.org/spec/http-client#d2e70:The disadvantage of the expath-http-client-java's use of
hc
and this 2nd namespace URI absent from the spec is that eXist doesn't recognize thehttp
prefix for the function described in the spec as "http:send-request()". For example,inspect:inspect-module-uri(xs:anyURI("http://expath.org/ns/http-client"))
returnsmodule/@prefix="hc"
. This isn't inherently an eXist problem; eXist merely uses the reference implementation, https://github.com/fgeorges/expath-http-client-java.Would a fix be possible for https://github.com/fgeorges/expath-http-client-java, or if not, would it be possible to ensure that the only namespace URI and prefix in the 2.0 version is the one defined in the spec? (See the draft at http://expath.github.io/expath-cg/specs/http-client-2/#namespaces-and-prefixes.)