O'Reilly logo

Effective XML: 50 Specific Ways to Improve Your XML by Elliotte Rusty Harold

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Item 20. Use Namespaces for Modularity and Extensibility

Namespaces are the standard tool for mixing multiple vocabularies into a single document. They are essential for allowing software to quickly and definitively decide which elements come from which applications, even when there's no potential conflict between names in the different applications. All new XML applications should define a namespace for their elements. Even if you don't plan to integrate your vocabulary with other applications, your users might want to integrate it with theirs.

This need not be particularly onerous. The simplest case, a document that uses a single namespace, can be handled with a single default namespace declaration on the root element. You don't even need ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required