Are multiple default XML namespaces allowed?

Consider the following xml

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="mycompany.com.myservice"> <soap:Header> <To xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://mycompany.com/myservice</To> <Action xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">mycompany.com/myservice/dosomething</Action> </soap:Header> <soap:Body> <mypayload>hello world</mypayload> </soap:Body> </soap:Envelope> 

- using multiple unrelated default namespaces?

+4
source share
2 answers

Yes.

In the case where you have multiple default namespaces, in the specification :

The default declared namespace extends from the start of the start tag, in which it is displayed to the end of the corresponding end tag , excluding the scope of any internal namespace declarations .

+5
source

Yes.

(that's all I was going to say, but StackOverflow doesn't like short answers).

+2
source

All Articles