XQuery: An important specification
The XQuery 1.0 specification — in progress since the Mesolithic era — reached a new milestone last week: it’s now a Proposed Recommendation from the W3C. (Well, no, it’s not really dating back 8000 years, but XQuery has been in progress since early 2003.)
XQuery is important because it’s essentially the XML-based analog to SQL. In other words, XQuery is a query language that applications can use to talk to servers, to extract data from documents, and do data-centric document transformation. It’s essential for data-driven service oriented architecture.
In the database realm, XQuery will be a replacement for XSLT 1.0, the Extensible Stylesheet Language Transformation facility. XSLT was really designed to assist with the presentation of XML documents, such as for output to a Web browser or exporting as PDF. Even so, XSLT has been shoehorned into doing just about everything to do with XML data transfer, in many cases inefficiently or inelegantly.
Industry support for XQuery is high, and the preliminary versions have been widely implemented in a number of commercial tools. Expect the W3C to swift approve the proposed draft, and make XQuery 1.0 into a full Recommendation (i.e., a standard). A lot of people are waiting anxiously for it.
Even so, the first rev of the specification isn’t a full analog to SQL; rather, it’s a data-retrieval subset of what we should expect XQuery to mature into. Thus, you can’t use XQuery 1.0 to submit data into a database: It’s pull, rather than push. For those capabilities, wait for XQuery 2.0.
Also on Nov. 22, the W3C upgraded XSLT 2.0 and XPath 2.0 to Proposed Recommendations. These are also important upgrades, and these three specs together vastly extend our ability to work with XML programmatically, and will drive data-centric SOA implementations.