20

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?

Seattle Leonard
  • 6,548
  • 3
  • 27
  • 37
  • 10
    To the vote-to-close folks, I think "is technology still something we should be using" is a valid subjective question. – Joe May 21 '10 at 16:49
  • 4
    @joe: I don't. Six months from now the answer could be completely different than it is today. If stack overflow is to stand the test of time the questions and answers shouldn't be relevant only for a tiny window of time. Answer-seekers could be greatly mislead by the answers related to a technology which has recently either fallen out of favor or has experienced a renaissance. – Bryan Oakley May 24 '10 at 21:36
  • 3
    This is a question and answer site, not just a reference site. Some questions are inherently subjective but still valid programming questions. If someone asked about whether to keep developing in VB6, that's a relevant questions due to maintainability, ability to find people with necessary experience, maturity of platform, etc. – Joe May 24 '10 at 22:55
  • 5
    I honestly don't get you "vote to close" folks. It's like you're worried about the size of the database or something. It was the principle reason I stopped being active @ Wikipedia, too. – Theodore R. Smith Jun 05 '13 at 09:43
  • [Now, 2014, XSL-FO is dead](http://stackoverflow.com/a/21345708/287948), see this [similar and more complete question](http://stackoverflow.com/q/10641667/287948). – Peter Krauss Feb 05 '14 at 15:40

13 Answers13

7

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.

Srikar Doddi
  • 15,499
  • 15
  • 65
  • 106
  • 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ä Silfverswärd May 24 '10 at 21:41
  • @SrikarDoddi and Erik, I think that XSL-FO is more specialized for PDF production (than XQuery, XPath or "pure XSLT"), but, [today, 2014, it will be replaced by CSS3-page](http://stackoverflow.com/a/21345708/287948). – Peter Krauss Feb 05 '14 at 15:44
  • This accepted answer hasn't aged well. In 2016, XSLT and related technologies are pretty much dead. XML still lives on, but isn't really being used in any new projects. – Sarhanis Oct 10 '16 at 23:39
  • @Sarhanis, why do you say "XSLT and related technologies are pretty much dead"? XPath is a related technology and we have now XPath 3.0 https://www.w3.org/TR/xpath-30/ since 2014 and XPath 3.1 https://www.w3.org/TR/xpath-31/ is on the way. Even XSLT 3.0 is a candidate recommendation since 2015. For instance Altova, a company providing various XML related tools, just last week released their 2017 product line http://www.altova.com/whatsnew.html with support for XSLT 3.0 and XPath and XQuery 3.1. – Martin Honnen Oct 11 '16 at 10:24
  • Specs might still be written, but not much code is. It's dead in the sense that not many people would choose XSLT if they could avoid it. Not many people would choose XML if they could avoid it, either. – Sarhanis Oct 11 '16 at 23:07
  • the robustness of xml technologies are the reason they are verbose and at times complex and thus are the reason they are rightly passed over for simpler technologies for inter app data passing and templating. but that does not mean its dead. when you need that robustness for data transformation and validation then there still isn't anything that touches it. – rocketboy2000 Oct 04 '21 at 17:47
6

Most of the answers here have not aged well.

At the time of writing, it's 2016, and XSLT is pretty much dead.

It's just far too cumbersome to transform XML with XSLT.

Even XML is being phased out. XML still lives on, mostly in long-running projects, but not many new projects would work with it.

Sarhanis
  • 1,577
  • 1
  • 12
  • 19
5

It's 2017 and I haven't touched it since 2010. Have completely forgotten the transformation syntaxes as well. RIP

Marin
  • 12,531
  • 17
  • 56
  • 80
4

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
  • 501
  • 1
  • 4
  • 16
2

Not dead, W3C is currently working on version 2.1

Check out XPath and XSLT 2.0 for .NET?, MS is not implementing it any time soon, but there are alternatives.

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

Community
  • 1
  • 1
Max Toro
  • 28,282
  • 11
  • 76
  • 114
1

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
  • 59,176
  • 9
  • 122
  • 152
1

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
  • 9,255
  • 4
  • 37
  • 54
1

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 Van Brunt
  • 15,244
  • 11
  • 66
  • 92
1

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
  • 8,913
  • 2
  • 32
  • 39
1

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
  • 305,152
  • 44
  • 369
  • 561
0

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?

i_am_jorf
  • 53,608
  • 15
  • 131
  • 222
0

Many answers seem a little biased against XML...

The world of finance is migrating to ISO 20022, which is based on XML.

https://www.iso20022.org/

Microsoft BizTalk Server 2020 includes XSLT 3.0 Support.

https://social.technet.microsoft.com/wiki/contents/articles/53591.biztalk-server-2020-a-review-of-the-new-xslt-3-0-custom-transform-features.aspx

For example.

0

IMO, in order to answer this question, one could look for jobs on https://stackoverflow.com/jobs.

As of this writing, filtering jobs by tech with XSLT returns 0 jobs. While a technology like Java returns a humble number of 180 jobs.

Anotherway to see the "liveness" of a technology would be the number of questions asked on SO.

As of this writing, the XSLT top users page indicates 108 questions over last 30 days. The same page for React returns a whopping 9497 questions over last 30 days (nearly 88 times more than xslt).

If not dead, XSLT isn't vibrant anymore.

Stephan
  • 41,764
  • 65
  • 238
  • 329