Anyone have experience with XSLT? The recent kerfu...
# thinking-together
i
Anyone have experience with XSLT? The recent kerfuffle about removing it from the html spec and the episode of Igalia Chats about it were both quite interesting to me. A declarative tree-transformation language!? Sounds like the sort of thing you could build a web app engine around ;)
I looked into using XSLT to style my feeds, but haven't gotten around to it yet. But I might fast-track that effort, so that I can go down with the ship. Sounds fun.
💙 2
m
I used it twice, to generate PDFs with apache fop and to improve the erlang documentation
a
Way, way back, I used XSLT to build a UI from an XML description of the unix FHS. It was fun for a baby programmer, but I'm not sure I would recommend it. The language is kind of clunky, which is honestly no surprise considering it's, you know, XML. I don't think my project is still online, and I might not even still have the code, but I can try to find it. 😄 Edit: haha, it is still live: https://andrewfleenor.users.sourceforge.net/fhs/fhs.xml Also, it turns out if you Google "andrewfleenor sorceforge fhs", the AI summary is hilarious, at least if you know that the above link is the full extent of my contribution to the FHS.
m
the good parts: it feels like functional pattern matching or term rewriting the bard parts: the syntax
💯 3
a
yeah, I used to use diazo[0] a bit... it was a nice way to decouple theme/presentation from your CMS (or other dynamic content) -- it would essentially let you build your web app with minimal frontend design and styling, and just enough semantic markup to make it useful, and then rewrite the presentation layer with xslt {0] https://docs.diazo.org/en/latest/index.html
m
v
Most of the resources from when XSLT was in more active use on the web are going to be from ~20 years ago, and you'll have to use the Wayback Machine to get them to load. Check out most of the timestamps on the `xslt` tag on Simon Willison's blog, or Cmd-/Ctrl-F for `xslt` on the xml.com archives.
j
XSLT was a very mixed bag. As others have said, the syntax was terrible, but also it was missing some important semantics that made many common tasks extremely tedious. There were better competing proposals based on scheme, but they lost in the (ahem) marketplace of ideas…
d
Sounds like the sort of thing you could build a web app engine around
The first software shop I worked for did this, mostly for e-commerce on top of DB2 ERPs on AS/400s, and it was a colossal misstep. In theory it made so much sense! In practice it was an extra layer of misdirection which was approximately never used for its intended purpose. Its main use case (one data definition for multiple front-ends) always turned out to be more complex than XSLT could handle. (Or maybe the architects who designed it were right and we devs on the front lines were just holding it wrong?) Later, when I was responsible for a small piece of software supporting a client's XML document database, the tech that impressed me was XQuery. As a query language for NoSQL I remember it felt head and shoulders more powerful & elegant than what I was using for e.g. CouchDB.
🍰 2
t
Fun fact, my first experience with FP was using XSLT. This is how I discovered lisp, which crowd seemed to be of the opinion that XML was better when it was encoded as s-expressions. I’ve since learned Clojure and agree with the parenthesists. The graffiti of taggers makes parenthitis seem like a mild affliction. Now there is a certain syntactical meta-circular aesthetic to XML all the way down. However the best part of XSLT is XPath and that’s not even XML syntax. Even the most devoted double paired angle bracket double namers knew they had stop somewhere.
🍰 2