I know basics of namespaces in XML. Basically they provides the context of that element to processor(processor can be validator,parser, tranformer etc).
Cotext here means :- say i have two elements with same name elementA . When i prefix p:elementA and v:elementA i am providing the processor some meta data(processor already knows what to do with this meta data) so that it know elementA with prefix p is different from element with prefix v. Is that correct ?
say i have below xml
<p:Person
xmlns:p="http://contoso.com/People"
xmlns:v="http://contoso.com/Vehicles"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://contoso.com/schemas/Vehicles
http://contoso.com/schemas/vehicles.xsd
http://contoso.com/schemas/People
http://contoso.com/schemas/people.xsd"
targetNamespace="....">
<name>John</name>
<age>28</age>
<height>59</height>
<v:Vehicle>
<color>Red</color>
<wheels>4</wheels>
<seats>2</seats>
</v:Vehicle>
</p:Person>
What is the usage/relevance of schemaLocation and targetNameSpace here or in any xml ?