Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

XML Namespaces

Create universally unique names in XML, and annotate them using RDDL

Contributors:  W3C

Summary:  XML Namespaces allow you to provide universal names for elements and attributes in XML documents. Discover why and when you should take advantage of XML Namespaces, and learn about the importance of Resource Directory Description Language (RDDL).

Date:  25 Apr 2007 (Published 06 Feb 2007)
Level:  Intermediate

Activity:  3717 views
Comments:  

XML Namespaces allow you to provide universal names for elements and attributes in XML documents. Discover why and when you should take advantage of XML Namespaces, and learn about the importance of Resource Directory Description Language (RDDL).

Namespaces in XML 1.0 (Second Edition) [W3C Recommendation] provides a mechanism for the universal naming of elements and attributes in XML documents. Here is a simple example that explains the motivation behind XML Namespaces: Imagine that you have an XML vocabulary in which elements named "head" and "body" are marked as anatomical descriptions, but you wish to embed XHTML snippets in the document. XHTML also defines "head" and "body" elements. How do you distinguish the XHTML elements from the host vocabulary elements of the same name? Using XML Namespaces, you would assign a vocabulary marker to each. In XML Namespaces, each vocabulary is called a namespace, and there is a special syntax for expressing a namespace name (which is defined as a Uniform Resource Identifier (URI) ) associated with each element or attribute. Each element or attribute name can be connected to one namespace, and in this way you could distinguish the anatomical "head" from the XHTML "head." Among XML experts, XML Namespaces have been controversial because they add quite a bit of complexity to the XML processing model, and some people think the gain does not warrant the problems. Nevertheless, XML Namespaces have become almost universally accepted among XML users, and they are addressed in almost all XML processing technologies.

Namespaces in XML 1.1 (Second Edition) [W3C Recommendation] is an update that incorporates errata and adds, among other things, support for Internationalized Resource Identifiers (IRIs) and support for nullifying a namespace declaration.

RDDL

One issue that often comes up in association with XML Namespaces is what sorts of resources should be associated with the URI for a namespace. The XML expert community, led by Jonathan Borden and Tim Bray, came up with Resource Directory Description Language (RDDL) [Community Standard] as a standard for packaging information on a namespace. RDDL uses XHTML to provide prose descriptions of the vocabulary with embedded XLinks to provide pointers to key resources for helping understand or process the namespace. RDDL Version 2.0 [in development] is an update that seeks to replace XLink with two options: Resource Description Framework (RDF) or alternative XML linking suggestions developed on the mailing list for the W3C Technical Architecture Group (TAG) .


Resources

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=XML
ArticleID=193472
SummaryTitle=XML Namespaces
publish-date=04252007