Live data from Hacker News

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

github.com

301–310 of 337 posts

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

#301

Grug-speak is really not that endearing, could do without it entirely, maybe that’s just me. But exploration of old-ish ideas years after their hype cycles can be worthwhile indeed!

Yes, one line of it would be plenty. I didn't make it past the second paragraph, and don't care enough about the content to let ChatGPT make it less annoying.

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

#302
post #205

Earlier quoted context omitted.

Keys were a thing in XSLT 1.x already. XSLT 2+ was more about side effects. I never really grokked later XSLT and XPath standards though. XSLT 1.0 had a steep learning curve, but it was elegant in a way poetry is elegant because of extra restrictions imposed on it compared to prose. You really had to stretch your mind to do useful stuff with it. Anyone remembers Muenchian grouping? It was gorgeous. Newer standards lo…

"Newer standards lost elegance and kept the ugly syntax." My biggest problem with XSLT is that I've never encountered a problem that I wouldn't rather solve with an XPath library and literally any other general purpose programming language. When XSLT was the only thing with XPath you could rely on, maybe it had an edge, but once everyone has an XPath library what's left is a very quirky and restrictive language that…

Pretty true. I created a simplified XPath layer to a stax parser back in the day and it was a break through in xml usability.

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

#303

Earlier quoted context omitted.

I feel like we're mostly in violent agreement. The key point about frames in the original context of this thread as I understood it was that they allowed a site to only load the content that actually changes. So accounting for the table-layout era doesn't really change my perspective: frames were so bad, that web sites were willing to regress to full-page-loads instead, at least until AJAX came along -- though that a…

> I feel like we're mostly in violent agreement. Probably, yes! > So accounting for the table-layout era doesn't really change my perspective: frames were so bad, that web sites were willing to regress to full-page-loads instead That's where we disagree. From my point of view, what brought sites to full page loads were designers. Design folk wanted to break out of the "left side navigation, right content" mold and ma…

I appreciate looking at things from a different perspective! I can see your line of argument now.

I should clarify. I don't think JS killed frames, that's not what I meant. If anything, I think JS could have saved frames. But the failure of frames left a gap that eventually JS (esp. with AJAX) filled. Lots of other stuff was going on at this time too, including alternative tech like Java, Flash, and ActiveX, all of which were trying to do more by bypassing the "standard" tech stack entirely.

I think the ossification of web standards from ca. 1999 to 2012, combined with the rapidly growing user base, and with web developers/designers aggressively pushing the envelope of what the tech could do, put the standard stuff on the back foot pretty badly. Really, I'm talking about the whole ecosystem and not just the standards bodies themselves; there was an era where e.g. improving HTML itself was just not the active mentality. Both inside and outside of W3C (etc.), it seemed that nobody cared to make the standard stuff better. W3C focused on unproductive tangents; web devs focused on non-standard tech or "not the intended use" (like tables for layout).

So I think we can say that frames died a somewhat unfair death, caused partly by their initial shortcomings, partly by people trying to break outside of the (literal) boxes they imposed, and partly by the inability of the standard tech to evolve and address those shortcomings in a timely fashion. But just as there was a reason they failed, there was a reason they existed too.

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

#304

Earlier quoted context omitted.

XSLT/XPath have evolved since XSLT 1.0. Features are now available like key (index) to greatly speedup the processing. Good XSLT implementation like Saxon definitively helps as well on the perf aspect. When it comes to transform XML to something else, XSLT is quite handy by structuring the logic.

XSLT just needs a different, non-XML serialization. XML (the data structure) needs a non-XML serialization. Similar to how Semantic Web's Owl has four different serializations, only one of them being the XML serialization. (eg. Owl can be represented in Functional, Turtle, Manchester, Json, and N-triples syntaxes.)

XQuery is pretty close to "XSLT with sane syntax", if that's what you mean.

But the fundamental problem here is the same: no matter what new things are added to the spec, the best you can hope for in browsers is XSLT 1.0, even though we've had XSLT 3.0 for 8 years now.

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

#305
post #169

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,…

> XSLT 1.0 is still dominant How, where? In 2013 I was still working a lot with XSLT and 1.0 was completely dead everywhere one looked. Saxon was free for XSLT 2 and was excellent. I used to do transformation of both huge documents, and large number of small documents, with zero performance problems.

In the browsers.

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

#306

Earlier quoted context omitted.

Are you saying it is specified that you literally cannot implement it other than on top of, or by mimicing bug-for-bug, that library (the way it was impossible to implement WebQSL without a particular version of SQLite) or is Saxon XSLT just the only existing implementation of the spec?

Support required support from libxml/libxsl. That tops out at 1.0. I guess you could implement your own, as it’s an open standard, but I don’t think anyone ever bothered to. I think the guy behind Saxon may be one of the XSLT authors.

The author of Saxon is on the W3C committee for XPath, XSLT, and XQuery.

That said, Saxon does (or at least did) have an open source version. It doesn't have all the features, e.g. no schema validation or query optimization, but all within the boundaries of the spec. The bigger problem there is that Saxon is written in Java, and browsers understandably don't want to take a dependency on that just for XSLT 2+.

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

#307

It's sad how the bloat of '00s enterprise XML made the tech seem outdated and drove everyone to 'cleaner' JSON, because things like XSLT and XPath were very mature and solved a lot of the problems we still struggle with in other formats. I'm probably guilty of some of the bad practice: I have fond memories of (ab)using XSLT includes back in the day with PHP stream wrappers to have stuff like ` ` This may be out-of-da…

I never enjoyed XSLT. It always felt like a square peg for a round hole. I do miss XML though. It had so, so many power features that too few people knew how to use. XSD was incredibly good for domain modeling. It had an include systems for composing files. And nobody really made good use of mixed content, but it was a crazy powerful feature. You embed structured content in unstructured content inside structured content.

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

#308

Earlier quoted context omitted.

Now we have "JSON as savior". I see it way too often where new people come into a project and the first thing they want to do is to replace all XML with JSON, just because. Never mind that this solves basically nothing and often introduces its own set of problems. I am not a big fan of XML but to me it's pretty low in the hierarchy of design problems.

The only problem with XML is the verbosity of the markup. Otherwise it's a nice way to structure data without the bizarre idiosyncracies of YAML or JSON.

I mean, XML has its own bizarre idiosyncrasies like the whole attribute vs child element distinction (which maps nicely to text markup but less so for object graphs).

I would say that the main benefit of XML is that it has a very mature ecosystem around it that JSON is still very much catching up with.

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

#309
post #307

It's sad how the bloat of '00s enterprise XML made the tech seem outdated and drove everyone to 'cleaner' JSON, because things like XSLT and XPath were very mature and solved a lot of the problems we still struggle with in other formats. I'm probably guilty of some of the bad practice: I have fond memories of (ab)using XSLT includes back in the day with PHP stream wrappers to have stuff like ` ` This may be out-of-da…

I never enjoyed XSLT. It always felt like a square peg for a round hole. I do miss XML though. It had so, so many power features that too few people knew how to use. XSD was incredibly good for domain modeling. It had an include systems for composing files. And nobody really made good use of mixed content, but it was a crazy powerful feature. You embed structured content in unstructured content inside structured cont…

The original idea was good: having a purely declarative language running on the client which just does the model -> view transformation, and having the server serve the models. XSLT as an implementation of that idea is pretty bad, but mostly because using XML as the underlying syntax for a PL is very unergonomic. If the initial version of XSLT looked more like XQuery does, I think it would have been a lot more popular.

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

#310

Earlier quoted context omitted.

XSLT/XPath have evolved since XSLT 1.0. Features are now available like key (index) to greatly speedup the processing. Good XSLT implementation like Saxon definitively helps as well on the perf aspect. When it comes to transform XML to something else, XSLT is quite handy by structuring the logic.

XSLT just needs a different, non-XML serialization. XML (the data structure) needs a non-XML serialization. Similar to how Semantic Web's Owl has four different serializations, only one of them being the XML serialization. (eg. Owl can be represented in Functional, Turtle, Manchester, Json, and N-triples syntaxes.)

This is very understandable, where I get left at is the remaining gap between XML and XSLTs and where JSON or another format can cover.

Trying to close the gap often ends up creating more complexity than intended, or maybe even more than XML in some hands.

It definitely would be an interesting piece.

Post reply on HN