Namespaces, SOAP and XSLT

Roseanne Zhang

Because XSLT is doing exact the right thing! In your source, everything in your <update> tag belong to "http://why.is.this.url.repeated.in.the.result" name space. Therefore, those tags in your result should belong to the same namespace.

How do I change it to be as it is specified in my specification document, where the namespace appears only in the update-tag and not in the tags under it?

Do one of the following two will reach you "goal". The point is make those tags do not belong to the same namespace. However, I highly suspect that is what you really "want".

  • Put xmlns="" in all tags under <update xmlns="http:..."> in you soap XML source
  • Change it to:
    <mytag:update xmlns:mytag="http://why.is.this.url.repeated.in.the.result"> 
Both efforts are trying to make them belong to no namespace. However, if you have default namespace defined on higher level, the second choice will make them belong the higher-level default namespace. That is not the case for the source file you provided. It is just a precautious warning.