Title: What should be targetNamespace in API that is being versioned?
Tags: xml;api;soap;xsd
Question: Our team is developing an API which is being versioned. We have following naming schema:
http://example.com/remote/soap/vX.Y/wsdl
where X.Y is version number. My question is: should targetNamespace contain whole WSDL address or just i.e. http://example.com/remote/soap part?


Here is another answer: Digging through the Inernet, I have found following tutorial where one can read:
The value of targetNamespace is just a unique identifier, typically companies use there url followed by something to qualify it. In principle the namespace has no meaning, but some companies have used the url where the schema is stored, as the targetNamespace and so some XML parsers will use this as a hint path for the schema [...]
Taking under consideration fact that our API can significantly change among different versions, I think it would be better to provide the version number in targetNamespace URI.

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2013:00:05/14/13', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<xml><api><soap><xsd>', 'Title': 'What should be targetNamespace in API that is being versioned?', 'ViewCount': 69, 'id': 16545032, 'user_AboutMe': '<p>Entrepreneur and programmer.</p>\n', 'user_AccountId': 2684764.0, 'user_DisplayName': 'Wiktor', 'user_Reputation': 2699.0, 'user_Views': 78.0, 'user_id': 2319383.0}}