Live data from Hacker News

XSLT – Native, zero-config build system for the Web

github.com

121–130 of 337 posts

Re: XSLT – Native, zero-config build system for the Web

#121
post #112

Earlier quoted context omitted.

> many developers always had issues understanding the FP approach of its design, looking beyond the XML. It would probably help if xslt was not a god-awful language even before it was expressed via an even worse syntax.

The root cause is that many failed to grasp XML isn't to be manually written by hand on vi, rather it is a tool oriented format. Now ironically, we have to reach for tooling to work around the design flaws of json and yaml.

> The root cause is that many failed to grasp XML isn't to be manually written by hand on vi, rather it is a tool oriented format.

That reads like an indictment of using XML for a programming language.

Not that it has anything to do with the semantics of XSLT.

Re: XSLT – Native, zero-config build system for the Web

#122

I have worked for a company that (probably still is) heavily invested in XSLT for XML templating. It's not good, and they would probably migrate from it if they could. 1. Even though there are newer XSLT standards, XSLT 1.0 is still dominant. It is quite limited and weird compared to the newer standards. 2. Resolving performance problems of XSLT templates is hell. XSLT is a Turing-complete functional-style language,…

It's odd cause xslt was clearly made in an era where expecting long source xml to be processed was the norm, and nested loops would blow up obviously..

Re: XSLT – Native, zero-config build system for the Web

#123
post #112

Earlier quoted context omitted.

The root cause is that many failed to grasp XML isn't to be manually written by hand on vi, rather it is a tool oriented format. Now ironically, we have to reach for tooling to work around the design flaws of json and yaml.

> The root cause is that many failed to grasp XML isn't to be manually written by hand on vi, rather it is a tool oriented format. That reads like an indictment of using XML for a programming language. Not that it has anything to do with the semantics of XSLT.

I don't see why separate both.

XML is tooling based, and there have been plenty of tools to write XSLT on, including debugging and processing example fragments, naturally not something vi crowd ever became aware of amid their complaints.

Re: XSLT – Native, zero-config build system for the Web

#124
post #108

I have worked for a company that (probably still is) heavily invested in XSLT for XML templating. It's not good, and they would probably migrate from it if they could. 1. Even though there are newer XSLT standards, XSLT 1.0 is still dominant. It is quite limited and weird compared to the newer standards. 2. Resolving performance problems of XSLT templates is hell. XSLT is a Turing-complete functional-style language,…

Are you using the commercial version of Saxon? It's not expensive, and IMHO worth it for the features it supports (including the newer standards) and the performance. If I remember correctly (it was a long time ago) it does some clever optimizations.

The final free version of Saxon is a lot faster than earlier ones too. My guess is that it compiles the XSLT in some way for the JVM to use.

Re: XSLT – Native, zero-config build system for the Web

#126
XSLT is probably the #1 reason people get turned off from XML and swear it off as a mistaken technology. I actually quite like XML, so I have been trying lately to tease out exactly what it is that makes XSLT a mistake.

XML is a semi-structured format, which (apart from & ) includes plain text as a more or less degenerate case. I don't think we have any other realistic format for marking up plain text with arbitrary semantics. You can have, for example, a recipe format with as part of its schema, and it's trivial to write an Xpath to pull out all the s (to put them in your shopping list, or whatever).

Obviously, XSLT is code. Nobody denies this really. One thing about code is that it's inherently structured. Only the craziest of literate programmers would try to embed executable code inside of text. But I don't think that's the biggest problem. Code is special in that special purpose programming languages always leak outside the domain they're designed for. If you try and write a little language that's really well-scoped to transforming XML, you are definitely going to want to call stuff outside it sooner or later.

Combined with the fact that there really isn't any value in ever parsing or processing a stylesheet, it seems like it was doomed never to pan out.

Re: XSLT – Native, zero-config build system for the Web

#127
post #43

Earlier quoted context omitted.

I worked with a site using XSLT in the browser in 2008, but I think support goes back to the early 2000s.

I was _really_ deep into XSLT- I even wrote the XSLT 2 parser for Wikipedia in like 2009, so I'm not sure why I haven't been aware of browser native support for transformations until now. Or maybe I was and I just forgot.

It was a feature of IE5.

I updated an XSLT system to work with then latest Firefox a couple of years ago. We have scripts in a different directory to the documents being transformed which requires a security setting to be changed in Firefox to make it work, I don't know if an equivalent thing is needed for Chrome.

Re: XSLT – Native, zero-config build system for the Web

#128
XSLT was many people’s first foray into functional programming (usually unwilling, because their company got a Google Search Appliance or something). I can’t imagine ever reaching for it again personally, but it was useful and somewhat mind-expanding in its heyday.

Re: XSLT – Native, zero-config build system for the Web

#129
post #128

XSLT was many people’s first foray into functional programming (usually unwilling, because their company got a Google Search Appliance or something). I can’t imagine ever reaching for it again personally, but it was useful and somewhat mind-expanding in its heyday.

I made many transformation pipelines with XSLT back in the days, and even a validation engine using Schematron; it was one of the most pleasant experience I had.

It never broke, ever.

It could have bugs, of course! -- but only "programmer bugs" (behavior coded in a certain way that should have been coded in another); it never suddenly stopped working for no reason like everything does nowadays.

Re: XSLT – Native, zero-config build system for the Web

#130
post #32

What is this "XSLT works natively in the browser" sourcery? The last time I used XSLT was like 20 years ago- but I used it A LOT, FOR YEARS. In those days you needed a massive wobbly tower of enterprise Java to make it work which sort of detracted from the elegance of XSLT itself. But if XSLT actually works in the browser- has the holy grail of host-anywhere static templating actually been sitting under our noses thi…

> In those days you needed a massive wobbly tower of enterprise Java to make it work

You needed the jvm and saxon and that was about it...

Post reply on HN