Recently in XQuery Category

XSLT2/XPath2/XQuery1 fresh CRs

| 8 Comments | 1 TrackBack | , , ,

W3C has released fresh versions of the Candidate Recommendations of XML Query 1.0, XSLT 2.0, XPath 2.0 and supporting documents. No big deal changes - xdt:* types has been moved to xs:* namespace (damn XML Schema). See new XQuery1/XPath2 type system below. Looks like XSLT2/XPath2/XQuery1 are moving fast toward Proposed Recommendation. What's weird is that new documents all say "This specification will remain a Candidate Recommendation until at least 28 February 2006." Must be a mistake. Anyway, what are now chances for XSLT 2.0 in the .NET? Next major .NET release (Orcas) is expected October 2007 or so (forget newly announced .NET 3.0, which is actually .NET 2.0 + Avalon + Indigo). Plenty of time for XSLT2 to reach Recommendation status, even provided that Microsoft actually freezes codebase 6 months before shipping.

XQuery Style Conventions

| No Comments | 1 TrackBack | ,

Creators of the XQDoc, a free tool for documenting XQuery modules have released XQuery Style Conventions. They claim the document to be to be based on experience and feedback from the XQuery development community. It does seem ok to me. In a perfect world every programmer would follow style conventions of course. But we live in another kind of world...

In the latest article "Schema-Aware Queries and Stylesheets" Michael Kay explaines how useful XML Schema-awareness is for XQuery queries and XSLT stylesheets.

Michael Rys asks "What do you want to see regarding XML support in the next version of SQL Server?" Don't miss a chance to suggest your favorite feature.

Mike Kay keeps teaching us XQuery. New installment of his XQuery tutorials series sponsored by the Stylus Studio, is called "Blooming FLWOR - An Introduction to the XQuery FLWOR Expression" and covers XQuery FLWOR expressions, "the workhorse of the XQuery language".

That's a big milestone in a 6-years-going-so-far design-by-committee experiment: XSLT 2.0, XQuery 1.0 and XPath 2.0 are finally W3C Candidate Recommendations. That means that W3C now officially calls for implementations (which shows another weirdness of the design-by-committee process as XQuery alone has about 40 implementations already as per Ken North). CR phase will last at least till 28 February 2006, that means late 2006 is probably the timeframe for the XSLT 2.0, XQuery 1.0 and XPath 2.0 Recommendations.

Microsoft's paper about "the experiences and the challenges in implementing XQuery in Microsoft's SQL Server 2005" is available here.

[Via Michael Rys]

XQuery in 10 min

| No Comments | No TrackBacks | ,

Stylus Studio Team has published "Learn XQuery in 10 minutes" article by Mike Kay. Smells like Stylus Studio commercial, but anyway good intro to XQuery.

XML in SQL Server 2005 news

| No Comments | No TrackBacks | ,

Couple of news bits you want to check out if you are interested in XML and SQL Server 2005:

  1. Michael Rys talks about XML in the upcoming SQL Server 2005 on Channel9 43 min video.
  2. 15seconds.com published an article "SQL Server 2005 XQuery and XML-DML" by Alex Homer. Part 1, Part 2.

Michael Kay has released Saxon XSLT and XQuery processor v8.5. This new release implements some very interesting optimizations (available only in commercial version though) and new abilities, one of which is probably worth to implement in EXSLT.NET module.

Ken North:

WebServicesSummit.com has released two podcasts of a panel discussion with Ron Bourret, Dana Florescu, Michael Kay, Jonathan Robie and Michael Rys. The discussion topics include XQuery, native XML databases, SQL/XML databases, XSLT and related topics.

The part 1 podcast (MP3 audio) focuses primarily on XQuery (running time: 34:03). The part 2 podcast covers native XML databases and XML-enabled SQL databases. Running time is 22:46.
http://www.webservicessummit.com/People/XQueryGuruPanel.htm

Or podcast RSS feeds:

XML, SOA and web services podcasts

SQL/XML and database podcasts
I didn't listen yet, but sure it's a great stuff.

Almost 6 months after it's been announced that Microsoft won't ship XQuery implementation in the .NET 2.0, StylusStudio (maker of the namesake XML IDE) decided to run an online petition "XQuery for all" to urge Microsoft change the mind. Well, as a marketing action it's ok, but the petition itself is hopeless being ridiculously late. Asking Microsoft to include an implementation for a Working Draft technology, which they decided not to ship at least half a year ago and after Beta2 is out is a weird idea. Sorry guys, I won't sign it. Back in October 2004 - I would sign it for sure, but not now.

I call it the blogsphere shadow effect - sometimes we bloggers get blind and see no other parts of the world. Dare Obasanjo announced (in his blog of course) that XQuery is cut from .NET 2.0 back in October 2004 and we all discussed that (in blogs of course) for months, until it became clear that there are some developers out there, who just don't read blogs and so still playing with condemned XQuery bits in early .NET 2.0 betas. Then XML team published an official announce in January. And now in May we've got this petition, cool but too late.

Small advice for StylusStudio - one gotta read blogs in this century to be informed early.

XQuery as Perl for XML

| No Comments | 1 TrackBack |

New bunch of XSL/XQuery working drafts has been published, some in Last Call. Now it's 12 documents, including a new interesting one. Changes are mostly minor though so if they wouldn't get another zillion of comments (do many realize than by posting a comment, even about a small typo to W3C they effectively defer the spec?), we probably will see the very first Candidate Recommendation in a couple of months. I bet it will be XSLT 2.0.

It's always fun to read official W3C announces - the people writing them have good sense of humor. The previous time they have called XQuery "an XML-aware programming language" and Mike Champion (one of Microsoft representatives in W3C) said he wants to clear it up if that's not a mistake. He took care indeed. Now W3C calls XQuery a Perl-like language, great:

XQuery 1.0: An XML Query Language:
A non-XML, Perl-like syntax for querying collections of structured and semi-structured data both locally and over the Web - Last Call
Does it mean XQuery is positioned now as Perl for data (no XML is mentioned actually)? A write-only language for quick and dirty solutions? Ok, ok, I love Perl, this blog is run by Perl. But you get my point.

Michael Rys will be presenting MSDN Webcast "Making the Most of XQuery with SQL Server 2005 (Level 300)" at 4/26/2005.

This session provides an introduction to XQuery and the data modification language as implemented in SQL Server 2005, and shows you how to get the most from XQuery. Learn how to optimize XQuery and how to write some common XQuery expressions to get good performance.
Presenter: Michael Rys, Program Manager, Microsoft Corporation
Subscribe here.

Ivan Pedruzzi (Stylus Studio) has interviewed Michael Rys on XQuery, Yukon and XML technologies at Microsoft. Really interesting one, read it here.

Some attractive XQuery papers

| 1 TrackBack |

Some goodies from Daniela Florescu and the Database Group at the University of Heidelberg:

The rest is here.

SQLSummit.com published 15-minute video interview with Michael Rys on "SQL Server 2005: Integrating SQL, XML, and XQuery" - http://www.sqlsummit.com/People/MRys.htm.

"Michael discusses SQL Server 2005 support for XQuery, SQL/XML and the SQL:2003 standard. He discusses b-tree, quadtree, and r-tree indexes and pluggable and selectable indexing techniques for XML documents. He also comments about the evolution of XQuery."
Talking about Microsoft dialect - guess what's the first Michael's word in the interview? :)

[Via Ken North, the editor of SQLSummit.com]

XQuery book sample chapter

| No Comments | No TrackBacks |

By the way, Chapter 3 "Navigation" of the "XQuery: The XML query language" book by Michael Brundage is available online on Michael's site (PDF version). Take a look at http://www.qbrundage.com/xquery/toc.html.

Print this and stick near to your monitor:

XQuery 1.0 and XPath 2.0 type hierarchy chart

XQuery book hidden anagram

| 4 Comments | No TrackBacks |

I'm reading "XQuery: The XML query language" book by Michael Brundage. Very well written and enjoyable to read book (well may be that's because my previous one was oh-boy-1000pages-of-math-and-pseudocode "Introduction to Algorithms" ? :). Anyway, here is what an interesting stuff I found in Michael's XQuery book. On page 29 Michael presents sample team.xml document, here is small excerpt from it:

<Employee id="E5" years="0.6">
  <?Follow-up?>
  <Name>Jason Abedora</Name>
  <Title>Developer</Title>
  <Expertise>Puzzles</Expertise>
</Employee>

Nothing special, huh? But look more thoroughly. Can you see an anagram here? There is additional hint on the page 136, where Michael illustrates one-to-one join of team.xml with another sample document projects.xml using FLWOR expression. Here is an excerpt from the join:
<Name>XQuery Bandit</Name>
<Name>Jason Abedora</Name>
Now it's easy to see it :)

Michael Rys (PM for the SQL Server Engine support of XQuery) is trying to bring some order into the confusion around XQuery 1.0 and XPath 2.0 type system. His first instalment in the series introduces the terminology and general concepts. Read it here. More to come, worth to stay tuned.

Great article "XQuery from the Experts: Influences on the design of XQuery" by Don Chamberlin. It's an excerpt from a chapter of "XQuery from the Experts: A Guide to the W3C XML Query Language" book. Good reading. Why relational data model doesn't fit XML, why SQL can't be used to query XML data model, basic principles that underlie the design of the XQuery language etc.

"XQuery 1.0 and XPath 2.0 Formal Semantics" spec has been updated today and reached Last Call Working Draft status. This is a document you may want to read to get deep understanding of semantics of XQuery 1.0 and XPath 2.0 languages:

This document defines the semantics of [XPath/XQuery] by giving a precise formal meaning to each of the expressions of the [XPath/XQuery] specification in terms of the [XPath/XQuery] data model. This document assumes that the reader is already familiar with the [XPath/XQuery] language.

Comments are due by 15 April 2004.

XQuery for simple problems only?

| 3 Comments | 1 TrackBack |

Here is what Michael Kay (XSLT star, developer of Saxon, author of every-XSLT-dev-bible "XSLT Programmer's Reference" and XSLT 2.0 editor) writes about XQuery:

The strength of XQuery is that it is a simpler language than XSLT, which makes it much more feasible to implement efficient searching of very large XML databases.

Its other strength is that for simple problems, the XQuery code is much shorter than the XSLT code.

But for complex manipulation of in-memory XML, I would use XSLT every time, regardless of whether you're dealing with "data" problems or "document" problems.

Do you agree with him?

New XQuery book

| No Comments | No TrackBacks | ,

Michael Brundage's excellent XQuery reference book is finally available.
[Via Michael Rys]

XQuery : The XML Query LanguageDr. Rys is talking about just published (February 2004) "XQuery : The XML Query Language" book.

Michael Brundage is Technical Lead for XQuery processing at Microsoft and the recommendations are so weighty... I feel I want this book too.