Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XML Namespace URI with HTTPS?

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"/> 
  1. Are there XML parsers that try to connect to an address defined by xmlns URI?
  2. Parsers always download schemas by xsi:schemaLocation attribute?
like image 586
kavai77 Avatar asked Jun 08 '15 11:06

kavai77


People also ask

Can xmlns be https?

1 Answer. Show activity on this post. omitting the http or changing it to https will not work. The fact that the namespace contains http does not mean in any way that the SVG file will use the http protocol for any kind of communication.

What is URI in XML namespace?

A Uniform Resource Identifier (URI) is a string of characters which identifies an Internet Resource. The most common URI is the Uniform Resource Locator (URL) which identifies an Internet domain address. Another, not so common type of URI is the Uniform Resource Name (URN).

Why are XML namespaces urls?

Just like namespaces in . NET, namespaces in XML documents are designed to help prevent and resolve name collisions, especially if XML documents are from different organizations and/or domains of knowledge.

What is XML namespace with example?

What Is an XML Namespace? An XML namespace is a collection of names that can be used as element or attribute names in an XML document. The namespace qualifies element names uniquely on the Web in order to avoid conflicts between elements with the same name.


1 Answers

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 
like image 166
unor Avatar answered Sep 23 '22 14:09

unor