Subject: Re: [xsl] LINQ to XML versus XSLT From: "Alexander Johannesen" <alexander.johannesen@xxxxxxxxx> Date: Fri, 27 Jun 2008 16:20:30 +0200 |
On Fri, Jun 27, 2008 at 15:53, Joe Fawcett <joefawcett@xxxxxxxxxxx> wrote: > True but in LINQ's defence it is declarative, in the same mould as SQL. Really? By that token, all queries are declarative. In my world, declarative approaches deal more with expected outcome rather than querying known structures (i.e. XSLT matching does not require knowledge of the data model, whereas a query like SQL requires it). Anyway, I find both LINQ and the XML API non-elegant, like a hack on C# with an API of sorts instead of extending the language with native XML support. Why no language hasn't got XML as a native datatype yet is the truly absurd thing. Everybody use XML, yet no language has got it in its fabric. In other words, why ; XElement contacts = new XElement("contacts", new XElement("contact", new XElement("name", "Patrick Hines"), new XElement("phone", "206-555-0144"), new XElement("address", new XElement("street1", "123 Main St"), new XElement("city", "Mercer Island"), new XElement("state", "WA"), new XElement("postal", "68042") ) ) ); when you could do ; result = <contacts> <contact> <name>Patrick Hines</name> <phone>...</phone> ... </contact> </contacts> ; or ; result = <root><name>{$some.variable}</name></root> ; or ; result = <root> <xsl:for-each select="{$some.list}"> <name>{name}</name> </xsl:for-each> </root> ; Fiddling around with the various APIs we're currently doing is *so* 1999. Time to move on, no? Put the beauty of XSLT in your languages already. Alex -- --------------------------------------------------------------------------- Project Wrangler, SOA, Information Alchemist, UX, RESTafarian, Topic Maps ------------------------------------------ http://shelter.nu/blog/ --------
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] LINQ to XML versus XSLT, Joe Fawcett | Thread | RE: [xsl] LINQ to XML versus XSLT, Houghton,Andrew |
RE: [xsl] LINQ to XML versus XSLT, Houghton,Andrew | Date | RE: [xsl] LINQ to XML versus XSLT, Houghton,Andrew |
Month |