XQuery, learning by example

But where are the XBRL use-cases? Nowhere in particular

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.

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 US$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.

Join the newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Jon Udell

InfoWorld
Show Comments

Cool Tech

Breitling Superocean Heritage Chronographe 44

Learn more >

SanDisk MicroSDXC™ for Nintendo® Switch™

Learn more >

Toys for Boys

Family Friendly

Panasonic 4K UHD Blu-Ray Player and Full HD Recorder with Netflix - UBT1GL-K

Learn more >

Stocking Stuffer

Razer DeathAdder Expert Ergonomic Gaming Mouse

Learn more >

Christmas Gift Guide

Click for more ›

Most Popular Reviews

Latest Articles

Resources

PCW Evaluation Team

Edwina Hargreaves

WD My Cloud Home

I would recommend this device for families and small businesses who want one safe place to store all their important digital content and a way to easily share it with friends, family, business partners, or customers.

Walid Mikhael

Brother QL-820NWB Professional Label Printer

It’s easy to set up, it’s compact and quiet when printing and to top if off, the print quality is excellent. This is hands down the best printer I’ve used for printing labels.

Ben Ramsden

Sharp PN-40TC1 Huddle Board

Brainstorming, innovation, problem solving, and negotiation have all become much more productive and valuable if people can easily collaborate in real time with minimal friction.

Sarah Ieroianni

Brother QL-820NWB Professional Label Printer

The print quality also does not disappoint, it’s clear, bold, doesn’t smudge and the text is perfectly sized.

Ratchada Dunn

Sharp PN-40TC1 Huddle Board

The Huddle Board’s built in program; Sharp Touch Viewing software allows us to easily manipulate and edit our documents (jpegs and PDFs) all at the same time on the dashboard.

George Khoury

Sharp PN-40TC1 Huddle Board

The biggest perks for me would be that it comes with easy to use and comprehensive programs that make the collaboration process a whole lot more intuitive and organic

Featured Content

Product Launch Showcase

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?