I have been studying SOAP and WSDL in preparation for implementing a web service. One thing that I have encountered that puzzles me is that some of the URIs that I have seen use a trailing slash such as:
http://www.w3.org/some-namespace/
while other examples that I have studied omit this trailing slash. I really have several questions regarding this:
Yes, the w3c guidelines regarding URI's you have read are correct.
The two namespaces having not equal-strings-uri's are different namespaces. Even capitalization and white-space matters.
A namespace-uri does not mean that issuing a request for it should produce a web-response. Therefore, any reasoning whether it should or shouldn't end with "/" is not too meaningful.
In fact, a namespace-uri may even not satisfy the syntax rules for an URI and it will still serve its purpose for defining a namespace. It is perfectly useful to use a namespace such as, let's say:
"\/^%$#sdhfgds"
as long as it is unique (do note that in no way I am recommending such use :) ). Existing XML processors (such as parsers, XPath or XSLT processors) do not raise any errors when they encounter such namespace.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With