Free Newsletters
Technology & Business Daily

InfoWorld
Log-in | Register
STRATEGIC DEVELOPER  

XQuery and the power of learning by example

XQuery owes some of its success to its excellent use-case documentation for developers

By Jon Udell  
November 15, 2006
 

If you set out to explore XQuery, the XML query language, you’ll soon encounter a collection of examples, or use-cases, that show how XQuery can query and transform XML data. These scenarios are elaborated in a W3C document that presents a sample data set — about books, authors, prices, and reviews — and enumerates a set of queries against that data. For each query, there’s a description (“List names of users who have placed multiple bids of at least $100 each”), a solution written in XQuery code, and an expected XML output.

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

XQuery vendors love to demonstrate that their software can run these standard tests and produce correct results. Such demonstrations help validate implementations and serve as tutorials for learning the language.

The use-cases weren’t just slapped onto XQuery after the fact. They actually came first, and they guided the long and difficult process of developing XQuery. Jonathan Robie was one of the prime movers in the development of XQuery. When I interviewed him last year, he said that the use-cases provided invaluable guidance, and that he’d never attempt a project of similar scope without such guidance.

Now let’s contrast XQuery with another XML-based standard of comparable heft, XBRL (Extensible Business Reporting Language). Even if you’re not an accountant, you may know that XBRL is building momentum. There’s growing recognition that financial reporting based on a mishmash of Word, Excel, PDF, and HTML files won’t suffice. We require more speed and better transparency, and the consensus is that XBRL can and must meet those needs.

Last year the FDIC required banks to submit call reports in XBRL format. In September, the SEC awarded $54 million in contracts to convert its legacy EDGAR system to XBRL, and to complete the taxonomies that will enable all U.S. companies to file their required disclosures in XBRL.

But where are the XBRL use-cases? Nowhere in particular. You can find scattered examples on Web sites run by XBRL International, the International Accounting Standards Board, or XBRL vendors. But there’s nothing like XQuery’s canonical set. As a result, a vast chasm stretches between accountants, who know about corporate earnings reports and SEC filings, and XML technologists, who know about XML Schema and XLink.

Charlie Hoffman, an accountant who saw the need for XBRL in 1998 and who has been the prime mover in its development ever since, is hard at work trying to bridge that chasm. In the podcast mentioned in my last column on XBRL, I noted that one of XBRL’s claimed virtues — modular extensibility — wasn’t clearly illustrated in any existing documentation. Hoffman took that as an action item and recently showed me a draft document that’s rich with examples. But why only now? And why Charlie Hoffman, rather than the XML experts who have worked on XBRL?

The answer is that XQuery’s history is an exception. Software technologists, as a rule, undervalue examples. The Unix man page is a classic illustration of this mind-set. It’s a dictionary of raw capabilities. Applying them is left as an exercise for the reader.

Would up-front use-cases have made XBRL simpler and better? We’ll never know; that’s water under the bridge. If the XBRL examples arrive late, that’s better than never. But here’s hoping that future projects will heed Jonathan Robie’s advice and write the use-cases first.





 


 
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:


»  Microsoft: Don't misunderstand UAC, other Vista features
A Microsoft posting attempted to explain the most 'misunderstood' features of Vista: UAC, Image Management, Display Driver Model, Windows Search, and 64-bit architecture

»  Compuware 2.0 set as rebirth of company
Looking to revitalize, the vendor will evaluate products and focus on business value

»  Google overtakes Yahoo as most-visited U.S. Web site
For the first time, Google has knocked Yahoo off the top spot of the most popular Web site in the country

»  Top 10: HP-EDS buy, Icahn strikes again, China quakes
This week's roundup of the top IT news stories includes the continuing saga of MS-Yahoo, HP's big buy, Vista's developer problem, 3G iPhone rumors, and more

»  ObjectWave's Swan swims for RIA connectivity
Rich Internet application platform enables simpler connectivity between AJAX interfaces and server-side code

»  Bender forms group to promote OLPC's Sugar UI
Sugar Labs, founded by OLPC's former president of software and content, intends to use open source as a tool to promote a learning model




Virtualization: A Step by Step Approach to Success
Your virtual machines can be up and running in a matter of minutes. HP and Citrix have integrated XenServer with HP ProLiant servers and management tools, powered by hardware-assisted Intel Virtualization Technology to enable high- performance, cost-savings solutions for server consolidation and disaster recovery. Sponsor: HP

»  Click here to view this Webcast
  The Data Protection You've Been Looking For
Enterprise data is of supreme importance. If you can't find it quickly, it's worthless. If you lose it, it's a crisis. This IT Strategy Guide explores how to keep your data safe.

»  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  IT EXEC-CONNECT   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