3 ms·
XSLT is not a programming language. It's a declarative transform for XML, and when you need such a thing, it is extremely useful.
by xyz_opinion 1y ago
XSLT is not a programming language. It's a declarative transform for XML, and when you need such a thing, it is extremely useful.
- peterhunt 1y agoLet's see: - Variable scoping https://developer.mozilla.org/en-US/docs/Web/XML/XSLT/Reference/Element/variable https://developer.mozilla.org/en-US/docs/Web/XML/XSLT/Refere... - Function definition and application https://developer.mozilla.org/en-US/docs/Web/XML/XSLT/Reference/Element/template https://developer.mozilla.org/en-US/docs/Web/XML/XSLT/Refere... - Flow control https://developer.mozilla.org/en-US/docs/Web/XML/XSLT/Reference/Element/if https://developer.mozilla.org/en-US/docs/Web/XML/XSLT/Refere... - Loops https://developer.mozilla.org/en-US/docs/Web/XML/XSLT/Reference/Element/for-each https://developer.mozilla.org/en-US/docs/Web/XML/XSLT/Refere... - Module system https://developer.mozilla.org/en-US/docs/Web/XML/XSLT/Reference/Element/import https://developer.mozilla.org/en-US/docs/Web/XML/XSLT/Refere... Yep, it's a programming language. And not a great one!
- xyz_opinion 1y agonah. its a transform for XML and its super useful when you need it. People such as yourself who claim its not a great programming language are probably not trying to use it for the right thing.
- mcswell 1y agoI was using it to transform DocBook XML into LaTeX, based on an existing tool that used xslt code to do just that (https://sourceforge.net/projects/dblatex/ https://sourceforge.net/projects/dblatex/). We had to modify the existing xslt code to allow for enhancements to DocBook that accommodated some linguistic structures (like interlinear text). So yes, we were using it for exactly the right thing: transforming XML.
- xyz_opinion 1y agoyes, transforming xml. and it was useful. great! edit: zomg mcswell I see you're the person I was replying to in the first place, to this absurd comment: "First, who decided that XML was a good format to write a programming language in? Punch cards would have been better" I mean come on.
- mcswell 1y agoI stand by my comment; apparently you don't recognize hyperbole when you see it. At any rate, there's absolutely no reason for a command in any programming language to require open and close XML tags: it's a waste of space, and just gets in the way of understanding the program,. If you need to close a command, there are things like {}, semicolons, parens (LISP), exdenting (Python), or even--yes--the 80th column in a punch card.
- mcswell 1y agoOn what grounds do you contend that it's not a programming language? There are other declarative programming languages, like Prolog, so I fail to see how the fact that it's a "declarative transform" makes it any less of a programming language.