Tuesday, December 04, 2007

LINQ to XSD Redux and LINQ to Stored XML Coming

LINQ to XSD was a technology spearheaded by Ralf Lämmel while he was a member of Microsoft's Data Programmability/XML Team. He released an alpha version 0.1 for the LINQ to XML CTPs and 0.2 for the Orcas Beta 1 drop. No LINQ to XSD alpha appeared for Orcas Beta 2, probably because Dr. Lämmel returned in July 2007 to Germany to assume a full professorship in the new University of Koblenz-Landau's Computer Science Department.

Updated January 14, 2007: See below.

No one at Microsoft responded to my requests for an update to LINQ to XSD's status, including my following post of November 17, 2007 to the LINQ Project General Forum:

Ralf Lämmel updated his LINQ to XSD implementation that enables strongly-typed LINQ to XML queries from the November 2006 Preview Alpha 0.1 for the May 2006 LINQ CTP to Preview Alpha 0.2 for Orcas Beta 1 on June 5, 2007. Dr. Lämmel then returned to Germany to assume a full professorship in the Department of Computer Sciences of the University of Koblenz (Germany).

There’s been no word from the XML Team that’s responsible for LINQ to XML about an update to LINQ to XSD for the final VS 2008 bits. Hopefully, this very useful LINQ implementation won’t disappear as a result of attention attrition.

Today's LINQ to XSD Story

Out of the blue on December 5, 2007 comes Microsoft's Shyam Pather with his LINQ to XML: Visual Studio 2008, Silverlight, and Beyond presentation at the XML 2007 conference in Boston. Following the usual LINQ to XML in VB 9.0 marketing hype in the abstract, Shyam says:

We will also discuss incubation efforts for a post-Visual Studio 2008 technology, LINQ to XSD, which provides .NET developers with support for typed XML programming. LINQ to XSD contributes to the LINQ project (.NET Language Integrated Query); in particular, LINQ to XSD enhances the previously mentioned LINQ to XML technology that is expected to release in Visual Studio 2008. [Emphasis added.]

You can download the PowerPoint slides for the session here.

Shyam previously participated in the Microsoft-sponsored Interop Round Table & Happy Hour – Development Discussion on Interop and XML, which started at 4:00 PM on December 4, 2007. Douglas Crockford (Yahoo!), Miguel de Icaza (Novell Inc.), Mattew Weier O’Phinney (Zend), Vijay Rajagopalan (Microsoft), and Craig Kitterman (Microsoft) also participated. Vijay's presenting Document Interop: Ecma Office Open XML and OASIS ODF, Enterprise Interop: Identity and XML, Web Interop: Ajax with XML and JSON (with Crockford and O'Phinney).

I wonder why the XML Team and others at Microsoft had nothing to say in its blog about the apparent resurrection of LINQ to XSD. Are these "incubation efforts" secret? A "breaking news" story?

Update 1/14/2007: Hartmut Wilms reviewed Shayam's XML 2007 presentation in this December 5, 2007 InfoQ article: Post-VS 2008-Technology: LINQ to XSD and LINQ to Stored XML.


Ralf posted a series of four articles on typed XML programming in mid- to late-2006:

And released the LINQ to XSD Preview Alpha 0.1 version for the and a LINQ to XSD Overview whitepaper with the last post. Following are my posts after the initial Preview Alpha 0.1 version:

Update 12/5/2007: VB MVP Bill McCarthy posted an interesting suggestion in his LINQ to XSD --> VB can do better! post of December 5, 2007 regarding implementing LINQ to XSD with a schema as a dynamic interface. Ralf discussed VB 9.0 dynamic interface implementation in his Generalized vs. dynamic interfaces post of December 23, 2006:

For instance, dynamic interfaces of some form or another would allow us to carry out XML-data binding very much in the LINQ to XSD manner, but without incurring the cost of extra objects for typed views.

VB 9.0 introduced dynamic interfaces, which Erik Meijer calls "Strong Duck Typing." You'll find an example of a simple dynamic interface implementation as part 11 of the "Overview of Visual Basic 9.0" XML 2005 conference session by Erik, Amanda Silver, and Paul Vick.

Stealth Topic: LINQ Queries Against the SQL Server 2005+ XML Data Source

Missing from the abstract is the topic that many forum participants have asked about: Queries against SQL Server 2005 and later's xml datatype.

Slide 27 introduces Future Work: LINQ to Stored XML whose goal is to "provide strongly-typed LINQ experience over data in XML database columns," which requires "[m]apping from XML schema to classes" and "[q]uery translation from LINQ expressions to [a] server XQuery expression."

Slides 28, 29 and 30 use AdventureWork's Resume table as the data source to:

  • Filter and Project on XML Scalar Attributes
  • Enumerate on Collection Type

Unfortunately, there's no word on when we might expect another alpha or beta of LINQ to SQL for Visual Studio 2008 or an early preview of LINQ to Stored XML.


Bill_McC said...

Hey RJ,

Just a typo.. that link to the Welcome to LINQ [to XSD]! is from 2006 not 2007.
I clicked the link and didn't pay attention when I got there, and started worrying about what I was reading. Eventually I realized it was from over a year ago ...phew !

--rj said...


Thanks for the heads-up. Fixed.


duckboy said...

So, it looks like LINQ to Stored XML made a no-show in SP1 - do you have any updated information on when we might be seeing some alpha or even RC bits for this much-wanted feature?

--rj said...


Haven't a clue re LINQ to Stored XML status. All's quiet on the LINQ to XSD front, too.


The Mighty Will said...

Any "new" news? I am looking for the Linq to XSD features I recently saw in a SP1 demo.

--rj said...

@mighty will

Haven't seen any word on LINQ to XSD > Alpha 0.2 of 5/24/2007.


Steve said...

8 months later and I'm looking around for LINQ to Stored XML/LINQ to XSD. I can't find any new announcements from MS.

Are there any updates?
is the project dead?
is there a better/different way of achieving the same thing that I'm completely unaware of!?


Steve said...

woah! ..and 5 minutes after posting here, I find this... xml team releases project to codeplex! http://blogs.msdn.com/xmlteam/archive/2009/06/03/linq-to-xsd-now-available-on-codeplex.aspx

--rj said...


My http://oakleafblog.blogspot.com/2009/06/linq-and-entity-framework-posts-for.html post of 6/1/2009 included the CodePlex announcement and a link to this post.