Welcome to MSDN Blogs Sign in | Join | Help

Promises, promises

So much for for blogging more regularly.  But if there was ever a reason to start up again, Mark's recent post on XSLT 2.0 and Dare's response are as good a reason as you can get.  As the XML Query (XPath, XSLT, XQuery, anything else) Program Manager for the .NET Framework, it's time for me to chime in.

First, we're not abandoning XSLT 1.0.  Far from it, we've completely rewritten our XSLT implementation from scratch in Whidbey (XsltCommand) in order to solve the major performance issues we had with the current implementation.  Our original intention was to meet MSXML 4.0's incredible performance.  I believe we'll surpass this goal by the time we release.

XSLT 1.0 will still be a (the?) core scenario for the query team, even in the Whidbey timerame.  Transformation is a vital piece of functionality in most XML processing pipelines, this will not change in the forseeable future.  The question then becomes, what is XSLT 2.0 bringing to the table that makes it compelling.  We're not interested in implementing a standard just so we can tick off a checkbox on some feature list.  We're here to solve customer problems.

Several years ago we sat down and evaluated the intentions of both XQuery 1.0 and XSLT 2.0 while they were both in their infancy.  We looked at the pains our customers were telling us they were having.  We looked at where we anticipated their pains would be in 5 or 10 years.  This yielded some interested conclusions:

  1. People wanted a more powerful XPath...and all they had was XSLT.  We saw (and still see) case after case of people who need some advanced querying functionality and shoehorning XSLT to solve the problem.  XPath 2.0 doesn't solve the problem either because the scenarios required some XML construction in the results.
  2. XSLT syntax and programming paradigm is not user friendly.  This was Mark's main point and is something we've heard from developers over and over again.  Syntax is an easy problem to solve, just make a human-friendly alternative.  However, the programming paradigm is quite hostile to anybody who isn't a fan of LISP.  This is a fundamental issue many people have with the language.
  3. ASP.NET 2.0 is a phenomenal product.  Many of us believe that one of our key XSLT scenarios, HTML generation, will be greatly diminished with the ease in which an ASP.NET solution can be developed.  There will still be cases for XSLT on a web server, however this will be reduced in time.

These data points left us two real conclusions:

  1. Implement both XSLT 2.0 and XQuery in the .NET Framework
  2. Implement XQuery in the .NET Framework

There was much deliberation on this topic and we concluded that we were satisfying the transformation scenarios our customers had, but were failing on the core query scenarios.  Given that we don't have infinite resources, we felt that having a strong XPath 1.0, XSLT 1.0, and XQuery 1.0 implementation was more important than having a mediocre XPath 1.0/2.0, XSLT 1.0/2.0, XQuery 1.0 story.

This is a bet that Microsoft is making.  We're putting a stake in the ground and saying we want XQuery to be defacto XML query language.  SQL Server 2005 will have a native XML datatype which will utilize XQuery.  We're also talking with other product teams which use XML extensively to get them on the wagon.  Again, this is to ensure that long term we have a strong, consistent message rather than a weak, fragmented one.

For those of you attending TechEd 2004 in San Diego this year, feel free to check out DAT327.  Michael Rys and myself will be presenting a session on XQuery in SQL Server and the .NET Framework.  You'll be able to grill us in person :)

Published Thursday, May 13, 2004 1:27 PM by arpande

Comments

# Take Outs for 13 May 2004

Take Outs for 13 May 2004
Friday, May 14, 2004 12:43 AM by Enjoy Every Sandwich

# XQuery 1.0, XSLT 2.0 and XPath 2.0: The blogging continues

XQuery 1.0, XSLT 2.0 and XPath 2.0: The blogging continues
Friday, May 14, 2004 2:25 AM by Michael Rys

# re: Promises, promises

Thanks for the explanations.

One big question: are you planning to add any functionality to your XPath ('1.0') implementation, so it provides better functionality than it does now? Two issues jump to mind:

(1) Support for the alternation operator within expressions (e.g. "/something[@a='foo']/(b|c)" instead of "/something[@a='foo']/b|/something[@a='foo']/c". This is of course not strict XPath 1.0, but omitting this is IMHO the biggest blunder in the XPath 1.0 spec. Which is nicely solved in XPath 2.0, but that spec adds so much extra junk that I don't need...

(2) Extensibility. Currently, to extend XPath (adding custom functions) you have to dive into the Xslt extension model. It really looks like the design of the XPath classes was done with the idea of 'XPath, well, we need that for Xslt' in mind, not realizing that Xpath is a perfectly valid stand-alone technology. The biggest problem right now is that you cannot add functions that return node sets cleanly, because a critical class is internal to the XML implementation dll: System.Xml.XPath.ResetableIterator. Also, the XSLT functions cannot be used in XPath without actually using XSLT; System.Xml.Xslt.XsltCompileContext is not a public class.

And yes, I am aware that the EXSLT.NET project found a way around it, by using an obscure subclass of ResetableIterator through reflection. But doesn't that emphasize that there is a design problem?

Are you going to add a working extensibility model for XPath 1.0 in the new framework, one that doesn't depend on internal classes (in the system.xml.xpath, system.xml.xslt or system.xml.xquery namespaces)?

And are you planning to make ResetableIterator public in the new framework?
Friday, May 14, 2004 12:47 AM by Luc Cluitmans

# re: Promises, promises

Well, while I disagree with your conclusions I respect the decision you've made.
The question is what is your expected behaviour when XSLT 2.0 processor for .NET will come up? Will you appreciate it?

PS. XQuery programming paradigm in fact isn't different from XSLT - the same no-assignment/no-side-effects functional language. The syntax simulates procedural paradigm a bit.

PPS. Luc - as "inventor" of ResetableIterator reflection hack in EXSLT.NET I want to inform you there is also better solution to that problem, no reflection, no hacks. I'll post it at my blog soon.
Sunday, May 16, 2004 4:23 AM by Oleg Tkachenko

# XQuery 1.0 Vs XPath 2.0: MS XML Team in the Hot Seat

.NET 2.0 will not support XPath 2.0/XSLT 2.0
Friday, July 30, 2004 12:04 PM by Ken Brubaker
Anonymous comments are disabled
 
Page view tracker