XML Namespace URI with HTTPS?

后端 未结 1 446
醉梦人生
醉梦人生 2020-11-29 10:11

Is it better to have a xmlns URI with https protocol?

For example this is the recommended way by the manual:



        
相关标签:
1条回答
  • 2020-11-29 10:29

    The URI is the namespace name, which identifies the namespace.

    While, in case of some URI schemes (like http, https, ftp etc.), it would be possible to provide the schema (or other related information), this is "not a goal":

    It is not a goal that it be directly usable for retrieval of a schema (if any exists).

    (Most URI schemes wouldn’t allow this to begin with, e.g., urn, tag, jabber etc.)

    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:

    http://www.springframework.org/schema/security
    http://www.Springframework.org/schema/security
    httP://www.springframework.org/schema/security
    http://www.springframework.org/schema/Security
    https://www.springframework.org/schema/security
    https://www.springframework.ORG/schema/security
    
    0 讨论(0)
提交回复
热议问题