Free Newsletters
Technology & Business Daily

InfoWorld
Log-in | Register
STRATEGIC DEVELOPER  

XML namespaces and training wheels

It would help to have tools to avoid creating problems for downstream applications

By Jon Udell  
August 08, 2003
 

There is an ongoing controversy in the XML world about the use of a feature called namespaces. By default, every element in an XML document is assigned to the "empty" namespace, but the document's root element — or any contained element — can be assigned to another namespace, identified by a URI (Universal Resource Identifier). The idea is to be able to mix and match XML vocabularies in a modular way. For example, my Weblog's RSS 2.0 feed includes an experimental element, called <body>, which lives in the XHTML (eXtensible HTML) namespace, not in the (empty) RSS namespace.

Free IT resource

Hear how top CIOs turn change into a competitive advantage.

Sponsored by HP

Free IT resource

Attend the SOA Executive Forum: Breaking SOA Bottlenecks SOAExecForum.com/may2007

Sponsored by InfoWorld

Normally in an RSS feed, the content of a blog item is not delivered as XML, but rather as HTML that is enclosed within the RSS <description> tag, and is massaged so that its HTML tags don't conflict with the enclosing XML tags. Since the content I create for my blog really is valid XML, I added the <body> element to make the content available as pure XML for use by other XML applications. In particular, I envisioned storing the <body> content in a database and then running XPath queries to do structured searches of the blog entries.

Months passed, things happened, and I never got around to creating that structured-search application. Then, last week, I took another look at my feed and suddenly it seemed wrong. I thought that I had not correctly assigned both the <body> element, and its contained elements, to the XHTML namespace. After conferring with Sam Ruby, a member of IBM's Emerging Technologies Group and one of the developers of an alternative syndication specification (provisionally called Pie, Echo, and Atom, but not yet finally named), I realized that I had, in fact, gotten it right in the first place.

It's not just me, lots of people trip over this stuff. Some notable experts — including Sean McGrath, CTO of Propylon in Dublin, Ireland — argue that namespaces should be avoided for that reason.

Clearly there's something counterintuitive about XML namespaces. Here are two oft-cited truisms that suggest different interpretations of that fact.

1. You never forget how to ride a bicycle.

2. Use it or lose it.

Some might say that mastery of XML namespaces is like riding a bicycle: Yes, it's counterintuitive, but the trick is impossible to forget once you learn it.

Others might say that mastery of XML namespaces is the kind of skill that atrophies with disuse.

Who would be right? We hope for the former, evidence so far suggests the latter, but I don't think we can decide yet. In my case, I haven't really ridden the bicycle yet. Although I'm publishing a mixed-namespace format, I'm not yet using it in a namespace-aware way.

In general, we don't have much experience creating and using simple XML vocabularies, never mind mixed ones. InfoPath, the first application making a serious bid to enable mainstream folks to routinely gather and use XML data, hasn't even shipped.

I think the creators of InfoPath and similar tools — who hope that use of modular XML vocabularies will turn out to be like riding a bicycle — ought to provide some training wheels. One thing that complicates use of namespaces, for example, is that their effects on downstream XML applications can be hard to predict. There are a number of equivalent ways to write a mixed-namespace document. But for downstream applications, such as structured search, some of those ways make life much harder than others. Tools that help us visualize the effects of mixing namespaces are an example of what I mean by training wheels. We're going to need them.





 


 
Jon Udell is lead analyst and blogger in chief at the InfoWorld Test Center.

  More of Jon Udell's column
  Jon Udell's Weblog

Newsletter Check out all of our free newsletters!
Enter e-mail address:




 

TOP NEWS:


»  Four quick tips for choosing an IM security product
71 percent of businesses will invest in real-time messaging this year. If you're one of them, be sure to protect your enterprise

»  Forrester analysts ID hot IT jobs
Research group finds 16 IT roles with a promising future

»  Nvidia claims 10 hours of HD video on Tegra chip
The Tegra 600 and 650 can be used with hard disk drives and are designed partly for mobile Internet devices

»  Database vendors add Google's MapReduce
Greenplum and Aster Data Systems will support Google's programming technique, developed for parallel processing of large data sets across commodity hardware

»  Network management: Tips for managing costs
New technologies, changing requirements, and ongoing equipment maintenance and upgrades cost money, but there are ways to manage expenses

»  EMC targets SMBs, branch offices with new low-end storage
Celerra NX4 highlights include thin provisioning, snapshot technology for data recovery and backups, and Web-based console for management of storage volumes




Remote Access: Maintain Security and Decrease the Burden on IT
Join this interactive webcast to discover how IT Managers can control access rights, end-user security settings and end-point authorization. Sponsor: Citrix(R) GoToMyPC(R) Corporate

»  Click here to view this Webcast
  Planning For A Disaster
This new, comprehensive Solutions Guide is your one stop source for Disaster Recovery. In it you'll learn how to reduce the likelihood of a disaster and to create a rock solid business continuity plan should you face a disaster situation. Sponsored by Equallogic

»  Click here to download now

- Special Advertising Partners -
WHITE PAPERS
 

» Technology White Papers Library

Technology White Papers by Topic

Technology White Papers E-mail Alert

Find out when the latest white paper is available:
 
 
INFOWORLD MARKETPLACE
 
» BUY A LINK NOW
 

FIND PRODUCTS AND COMPANIES
» COMPLETE PRODUCT GUIDE



TECHNOLOGY INDEX
• Applications
• Application Development
• Security
• Networking
• Wireless
• Platforms
• Hardware
• Data Management
• Storage
• Web Services
• Business
• Telecom
• Professional Services
• Standards

TECH WATCH 


What's the 411 on GOOG-411?
Just as Google has become synonymous with "performing a Web search," 411 is understood to mean "information" -- as in "what's the 411?" I was thus surprised to discover, from a billboard, no less, that the king of search is taking on the ...

Apple HTML source reveals 'iPhone Extreme'
"This one's a stretch..." reports AppleInsider. Um, yeah. Reporting on HTML code sightings of product names could be called a stretch, but iPhone Extreme has a ring to it. Now, that sounds like the product Apple should have released first, rather ...

COLUMNISTS

Unified under law
Ephraim Schwartz's Column and Blog (InfoWorld) - In the litigious world we live in, deploying a unified communications platform in your enterprise could...
» MORE COLUMNISTS

MORE INFOWORLD BLOGS


Open Sources 
Product Management
When I joined MySQL four years ago, there was quite a lot of debate about product management. We didn't actually have ...

Zero Day 
Botnet herders tending smaller flocks
New research backs up the theory that botnet operators are keeping their networks smaller in a continued effort to keep ...



• Advice Line
• Database Underground
• The Deep End
• Enterprise Mac
• Geeks in Paradise
• Grid Meter
• The Gripe Line
• InfoWorld Daily
• Inside IT
• IT Troubleshooter
• ITXtreme
• Open Sources
• ProdBlog
• Real World SOA
• Reality Check
• Security Adviser
• SMB IT
• The Storage Network
• Tech Watch
• Virtualization Report
• Zero Day

ADVERTISEMENT


RESOURCE CENTERadvertisement 

GOVERNMENT IT & POLICY
'If you don't go after the network, you're never going to stop these guys. Never.'
From the State Department, All the News for Inquiring Minds
TechPresident, the Internet Citizenry's New Consensus Taker



Sponsored Technology Links

 
 
 HOME  NEWS  BLOGS  PODCASTS  VIDEOS  TECHNOLOGIES  TEST CENTER  EVENTS  CAREERS   About | Advertise | Awards | RSS | Contact Us 

Copyright © 2008, Reprints, Permissions, Licensing, IDG Network, Privacy Policy, Terms of Service.
All Rights reserved. InfoWorld is a leading publisher of technology information and product reviews on topics including viruses,
phishing, worms, firewalls, security, servers, storage, networking, wireless, databases, and web services.

CIO :: ComputerWorld :: CSO :: Demo :: GamePro :: Games.net :: IDG Connect :: IDG World Expo
Industry Standard :: IT World :: JavaWorld :: LinuxWorld :: MacUser :: Macworld :: Network World :: PC World :: Playlist