tags:

views:

214

answers:

9

I'm currently taking on a new project at home. In this project I'm going to be generating HTML emails. For this purpose, I believe XSL to be a good candidate.

However, I have heard people say that XSL is a dead language, and if it's not that it is on it's way out. In fact, MS has been very leary to support XSL 2.0.

Personally I feel that any time you are going from text to text, it is a great tool. Such as:

  1. Generating HTML e-mails
  2. Creating Open Office Docs
  3. Generating another XML doc

What are your thoughts? Is it dead, or is it still a viable, usefull tool?

A: 

Judging from how often I see it used, it is most certainly not dead. It is, however, still kinda slow. What else did you investigate before deciding on XSL?

jeffamaphone
My current employer uses it extensively, so I've gotten pretty good at using it.
Seattle Leonard
+1  A: 

I use it every day, as many others do. I think the problem with XSL is that it requires some getting used to because it isn't an imperative programming language, and it can be pretty verbose sometimes. That said, support for XSLT 1.0 is great and with an engine supporting extension objects (such as the .NET engine) you can add missing functionality pretty easily.

Lucero
+3  A: 

XSLT has proven itself to be both a powerful and adaptable language, but now we can also choose XQuery. XSLT 2.0, XQuery 1.0 and XPath 2.0 are just the same query language dressed up in different forms. Learning one means that you can easily master the others.

CodeToGlory
Good points! XSLT is not dead by far, which XSLT 2.0 proves. In fact it's very powerful if used for the right tasks. We use it for transformation of XML into XSL-FO to produce automatically layouted PDF files with very good results.
Erik Töyrä
+1  A: 

We used XSL very successfully in my company to create reports. It is very useful and flexible and permits to convert source data into multiple file formats.

We have to admit though, that preprocessors like PHP are even easier to use and more flexible in terms of programming (think of OOP and the possibility of using libraries like mysql, pdf-generatiion, etc.)

So XSL is surely a very powerful tool, but there are a lot of easier and even more powerful alternatives to use nowadays.

Simon
+1  A: 

I am just finishing up a project which uses XSL to generate HTML emails from Infopath forms. We like this tool chain because our designers can read and edit the XSL without too much hand holding and as new fields and business cases pop up the InfoPath form is also editable by non-programmers. The only real code which had to be written was a .net webservice to perform the transformation and update the database. The only real issue which has come up was figuring out how to display non ascii characters inside the XSL template.

Nick
A: 

DEAD! The company I work for used it for almost a decade now. They ported an old ASP classic site over to .NET and instead of creating new aspx pages they just continue spewing all of the data into a large XML tree and sending it to render and then stying it's output using xslt.. I mean literally everything was done in xsl.

The problem? XSL(t) is extremely limited in it's ability to handle anything other then arrays, simple if statements and just displaying variables.

The language has 1 REAL use.. Styling XML, and for that it will never really "go away" but for all practical usages, I'd say DEAD, don't waste your brain learning it unless you have too and even then it might only take you a day or two max reading on Google search results to learn all the basics of XSL and it's capabilities.

ETHODE Web Development
+1  A: 

At my company, we use XSLT to transform XML export formats of different applications, so we can export from one and import to another application. We use XSLT and STX, with callbacks to Java code for complex computations.

Christian Semrau
+1  A: 

Not dead, W3C is currently working on version 2.1

Check out this question about XSLT 2.0 on .NET, MS is not implementing it any time soon, but there are alternatives.

There's a big difference between not popular and dead.

Max Toro
+1  A: 

Not dead, but not the only game in town. I'd say that a templating solution like Velocity is better suited for e-mails.

You can't look at an XSL stylesheet and see what the resulting document looks like as easily.

duffymo