带HTTPS的XML命名空间URI?

带HTTPS的XML命名空间URI?,xml,xml-parsing,schema,uri,xml-namespaces,Xml,Xml Parsing,Schema,Uri,Xml Namespaces,使用https协议的xmlnsURI更好吗 例如,这是手册推荐的方法: <http xmlns="http://www.springframework.org/schema/security"/> 这样做合法且更好吗 <http xmlns="https://www.springframework.org/schema/security"/> 是否有XML解析器尝试连接到由xmlnsURI定义的地址 解析器总是通过xsi:schemaLocation属性下载模

使用
https
协议的
xmlns
URI更好吗

例如,这是手册推荐的方法:

<http xmlns="http://www.springframework.org/schema/security"/>

这样做合法且更好吗

<http xmlns="https://www.springframework.org/schema/security"/>

  • 是否有XML解析器尝试连接到由
    xmlns
    URI定义的地址
  • 解析器总是通过
    xsi:schemaLocation
    属性下载模式
  • URI是名称空间名称,它标识名称空间

    然而,对于某些URI方案(如
    http
    https
    ftp
    等),可以提供模式(或其他相关信息),这是:

    它的目标不是直接用于检索模式(如果存在的话)

    (大多数URI方案都不允许这样做,例如,
    urn
    tag
    jabber
    等。)

    您应该完全按照文档中的说明指定URI,因为这是消费者期望和寻找的(大多数消费者可能从未尝试实际检索URI),而XMLNames1.0对URI的要求非常严格

    所有这些名称空间名称都将不同,即使它们将解析为相同的Web文档:

    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
    

    换句话说,它应该被认为是一个不透明的标记。