XML Namespace URIs

I came across an article discussing the need (or lack of) for XML namespace URIs on http://www.xml.com that was interesting especially if you’ve worked with a lot of different namespace URIs over the years.  While I don’t necessarily agree with several of the statements made (read it yourself to form your own opinion though), there were some points that made sense especially when it comes to determining if you really need namespaces in a particular XML document. 

Sometimes I think people add unnecessary namespaces just to make the document look more complex so they look more knowledgeable (or something along those lines).  I prefer to keep things as simple as possible while still accounting for any naming collisions.  For instance, if I make a custom XML configuration file used in a single application there’s really no point to add namespaces UNLESS I anticipate collisions down the road (if multiple configuration files are aggregated together for instance and the files use similar elements).  If you’ve ever validated an XML document with multiple namespaces you know why it’s best to KISS when possible.

http://www.xmlforasp.net/codeSection.aspx?csID=85

comments powered by Disqus

No Comments