Parameterizing Namespaces

One of the biggest benefits of parameterization is that it lets you vary the namespace prefix. The fundamental principle of namespaces is that the prefix doesn't matter, only the URI matters. For instance, Statement, mb:Statement, and bank:Statement are all the same just as long as Statement is in the default namespace and mb:Statement and bank:Statement are in contexts where the mb and bank prefixes are mapped to the URI. Only the local name and URI matter. The prefix (or lack thereof) doesn't.

However, DTDs violate this principle. In a DTD only the qualified name matters. The parser validates against the prefix and local name. It ignores the namespace ...

Get Effective XML: 50 Specific Ways to Improve Your XML now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.