Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

"hc" namespace in HTTP Client? #130

Open
joewiz opened this issue Jan 23, 2019 · 0 comments
Open

"hc" namespace in HTTP Client? #130

joewiz opened this issue Jan 23, 2019 · 0 comments
Labels

Comments

@joewiz
Copy link
Member

joewiz commented Jan 23, 2019

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:

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.

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.)

@joewiz joewiz added the http label Jan 23, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant