In many xml examples i see many nameschemas which even dont use in xml like in below example we have defined nameschemas as xsi, aop and one default
namespace. If we dont use them what the purpose of defining them. Did not attach the xml as its quite big.
Second question is :- Assume that we using this nameschemas.. We usually defined the values of namechemas and schemalocation with some web address
like http://someAdddress//. What if we define them with some arbitrary value like ABC or something else. Will it make any differnce? Is there any
processing we do from these web addresses?
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/
schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema
/aop/spring-aop-2.0.xsd">
Another question is we have defined the schemalocation for xsi namespace only Not for aop namespace. Why so?
Last question is can we define namespace xsi1 instead of xsi? Does it make any im
Generally it should be the case that if a namespace binding isn’t used within a document, a declaration of that namespace is redundant and can safely be omitted (conversely, it won’t do any harm by being there.) I say it should be the case, but there are exceptions. One is DTD validation, which sometimes requires the presence or absence of a particular namespace declaration on a particular element (DTD processing isn’t namespace aware, so it treats namespaces as attributes). Another rather rare exception: I have seen XML vocabularies where namespace declarations are used to convey semantics other than simply declaring a binding for a namespace prefix, for example it might indicate version information. That’s bad XML design, but there’s a lot of bad XML design about.
As for xsi:schemaLocation, some tools/applications will ignore this, others may interpret it as a request to perform schema validation against a schema found at a particular location.