Is it better to have a xmlns URI with https protocol?
For example this is the recommended way by the manual:
<http xmlns="http://www.springframework.org/schema/security"/>
Is it legal and better to use this way?
<http xmlns="https://www.springframework.org/schema/security"/>
- Are there XML parsers that try to connect to an address defined by
xmlnsURI? - Parsers always download schemas by
xsi:schemaLocationattribute?
The URI is the namespace name, which identifies the namespace.
While, in case of some URI schemes (like
http,https,ftpetc.), it would be possible to provide the schema (or other related information), this is "not a goal":(Most URI schemes wouldn’t allow this to begin with, e.g.,
urn,tag,jabberetc.)You should specify the URI exactly as documented, as this is what consumers expect and look for (most consumers probably never try to actually retrieve the URI), and XML Names 1.0 is pretty strict about comparing URIs.
All these would be different namespace names, even if they would resolve to the same Web document: