0

In my legacy application we send xml message to one of the interfaces.
This XML has in its header this namespace (among few others)

xmlns:type="http://www.myCompany.com/HedgeAccounting

I would expect the Namespace to look like this

xmlns:HedgeAccounting="http://www.myCompany.com/HedgeAccounting

In a general way: what could be the reason for this difference ?

user3138101
  • 83
  • 1
  • 13
  • What exactly do you assume to be the difference? Both namespaces appear to be identical, only the assigned prefixes differ. – zx485 Jul 11 '20 at 18:14
  • Maybe this [Wikipedia article](https://en.wikipedia.org/wiki/XML_namespace#Namespace_declaration) helps you. – zx485 Jul 11 '20 at 18:17
  • When I change the generated namespace to xmlns:HedgeAccounting="http://www.myCompany.com/HedgeAccounting the Namespace type defined with different URIs error gone – user3138101 Jul 11 '20 at 20:21

1 Answers1

0

In your examples, type and HedgeAccounting are both XML namespace prefixes.

XML namespace prefix names themselves are inconsequential. It is only through their binding to an actual XML namespace URI that they derive meaning. Use whatever conventions might apply, or make up your own. You might use ns1, x, or fred, but as with any name, it's better to have some mnemonic justification. For example, xsd and xs are often used for the XSD namespace.

See also

kjhughes
  • 106,133
  • 27
  • 181
  • 240
  • When I change the generated namespace to xmlns:HedgeAccounting="myCompany.com/HedgeAccounting the Namespace type defined with different URIs error gone – user3138101 Jul 11 '20 at 20:21
  • Would have to see a [mcve] to help you further, especially considering that your comment, question title, and question body appear to be inconsistently presenting whatever problem you're having. – kjhughes Jul 11 '20 at 22:52