<p>Can anyone (maybe an XSL-fan?) help me find any advantages with handling presentation of data on a web-page with XSL over ASP.NET MVC?</p>

<p>The two alternatives are:</p>

<ol>
<li><p><strong>ASP.NET (MVC/WebForms) with XSL</strong><br/>
Getting the data from the database and transforming it to XML which is then displayed on the different pages with XSL-templates.</p></li>
<li><p><strong>ASP.NET MVC</strong><br />
Getting the data from the database as C# objects (or LinqToSql/EF-objects) and displaying it with inline-code on MVC-pages.</p></li>
</ol>

<p>The main benefit of XSL has been consistent display of data on many different pages, like WebControls. So, correct me if I'm wrong, ASP.NET MVC can be used the same way, but with strongly typed objects. Please help me see if there are any benefits to XSL.</p>

[{'answer_id': 39421, 'author': 'Artem Tikhomirov', 'author_id': 2313, 'author_profile': 'https://Stackoverflow.com/users/2313', 'pm_score': 0, 'selected': False, 'text': "<p>If you only going to display data from DB XSL templates may be convenient solution, but if you gonna handle user interaction. Hm... I don't think it'll be maintainable at all.</p>\n"}, {'answer_id': 39423, 'author': 'Keith', 'author_id': 905, 'author_profile': 'https://Stackoverflow.com/users/905', 'pm_score': 3, 'selected': False, 'text': "<p>I've always found two main issues when working with XML transformations:</p>\n\n<p>Firstly they tend to be quite slow, the whole XML file must be parsed and validated before you can do anything with it. Being XML it's also excessively verbose, and therefore larger than it needs to be.</p>\n\n<p>Secondly the way transformations work is a bit of a pain to code - custom tools like XmlSpy help, but it's still a different model to what most developers are used to.</p>\n\n<p>At the moment MVC is very quick and looking very promising, but does suffer from the traditional web-development blight of <code>&lt;%</code> and  <code>%&gt;</code> bee-stings all over your code. Using XML transformations avoids that, but is much harder to read and maintain.</p>\n"}, {'answer_id': 39434, 'author': 'kemiller2002', 'author_id': 1942, 'author_profile': 'https://Stackoverflow.com/users/1942', 'pm_score': 2, 'selected': False, 'text': "<p>I've used that technique in the past, and there are applications where we use it at my current place of employment.  (I will admit, I am not totally a fan of it, but I'll play devil's advocate)  Really that is one of the main advatages, and pushing this idea can be kinda neat.  You're able to dynamically create the xsl on the fly and change the look and feel of the page on a whim.  Is it possible to do this through the other methods...yes, but it's really easy to build a program to modify an xml/xsl document on the fly.</p>\n\n<p>If you think of using XSL to transform one xml document to another and displaying it as html (which is really what you're doing), you're opening up your system to allow other programs to access the data on the page via XML.  You can do this through the other methods, but using an xsl transformation forces it to output xml every time.</p>\n\n<p>I would tread lightly with creating a system this way.  You'll find a lot of pit falls you aren't expecting, and if you don't know xsl really really well, there is going to be a learning curve also.</p>\n"}, {'answer_id': 39543, 'author': 'samjudson', 'author_id': 1908, 'author_profile': 'https://Stackoverflow.com/users/1908', 'pm_score': 4, 'selected': True, 'text': '<p>I can see the main benefit of employing XSLT to transform your data and display it to the user would be the following:</p>\n\n<ul>\n<li>The data is already in an XML format</li>\n<li>The data follows a well defined schema (this makes using tools like XMLSpy much easier).</li>\n<li>The data needs to be transformed into a number of different output formats, e.g. PDF, WMP and HTML</li>\n</ul>\n\n<p>If this is to be the only output for your data, and it is not in XML format, then XSLT might not be the best solution.</p>\n\n<p>Likewise if user interaction is required (such as editing of the data) then you will end up employing back-end code anyway to handle updates so might prove one technology too far...</p>\n'}, {'answer_id': 566294, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p>Jafar Husain offers a few advantages in his <a href="http://themechanicalbride.blogspot.com/2010/04/modest-proposal-pretty-xsl.html" rel="nofollow noreferrer">proposal for Pretty XSL</a>, primarily caching of the stylesheet to increase page load and reduce the size of your data. Steve Sanderson proposed a slightly different approach using JavaScript as the controller <a href="http://blog.codeville.net/category/xslt/#" rel="nofollow noreferrer">here</a>.</p>\n\n<p>Another, similar approach would be to use <a href="http://www.w3.org/TR/XForms-for-HTML/" rel="nofollow noreferrer">XForms</a>, though the best support for it is through a <a href="http://code.google.com/p/ubiquity-xforms/" rel="nofollow noreferrer">JavaScript library</a>.</p>\n'}, {'answer_id': 978786, 'author': 'bleevo', 'author_id': 45909, 'author_profile': 'https://Stackoverflow.com/users/45909', 'pm_score': 1, 'selected': False, 'text': '<p>Check this out if you want to use XSLT and ASP.MVC </p>\n\n<p><a href="http://www.bleevo.com/2009/06/aspnet-mvc-xslt-iviewengine/" rel="nofollow noreferrer">http://www.bleevo.com/2009/06/aspnet-mvc-xslt-iviewengine/</a></p>\n'}]
['https://Stackoverflow.com/questions/39392', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2429/']