Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need explanations about urn and uri for a targetNamespace

 
Olivier Mocquais
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am wondering when I have to define a targetNamespace which type of xml namespace should I use ?

What are the advantages / drawback of each ?

targetNamespace="urn:sample" or targetNamespace="http://www.foo.org/services"
(I know that the two xml namespace are corrects but, in the RMH book, only the targetNamespace="http://www.foo.org/services" type is used).

Thanks.

Olivier
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It makes no difference.
However the preferred way is to use the URI - that however is based on the assumption that you will use an URI that is in your domain. So people at Sun will always use something like "http://java.sun.com/..." and people at IBM will always use "http://www.ibm.com/..." - so their namespaces never collide. It's assumed that each organization will have their own processes in place for avoiding namespace collisions internally.
It is however likely that two or more people on the internet will choose a namespace name like "urn:sample" making namespace collisions possible.

Then of course there is "http://tempuri.org/" which some tools use as a default - which you should change as quickly as possible.
 
Olivier Mocquais
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok. Thanks for your answer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic