Tuesday, 9 December 2014

Why is there redundancy in xsi:schemaLocation declaration?



The xml schema location contains http://ift.tt/GArMu6 which is already the schema global namespace. Then why is it always repeated in the xsi:schemaLocation element? The XSD/DTD defines the XML and so is needed for XML validation by the parser but why the repeated namespace?



<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://ift.tt/GArMu6"
xmlns:xsi="http://ift.tt/ra1lAU"
xsi:schemaLocation="http://ift.tt/GArMu6 http://ift.tt/1jdM0fG">

<bean id="test" />
</beans>

No comments:

Post a Comment