I am seeing some XSD schema documents that declare both a targetNamespace
and an xmlns:tns
attribute in their top schema
element. E.g. the following one taken from here. They also seem to have the same string value. I understand the role of targetNamespace
but what does xmlns:tns
do on top of that?
<?xml version="1.0" encoding="UTF-8"?>
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.org/Product"
xmlns:tns="http://www.example.org/Product"
elementFormDefault="qualified">
...