3 ms·
Some languages are hostile to plain old XML too though, mix one namespace declaration with an XML novice and you'll end up with much head scratching as to how t
by mattmanser 15y ago
Some languages are hostile to plain old XML too though, mix one namespace declaration with an XML novice and you'll end up with much head scratching as to how to actually get the data out.
And then you have to add a few utterly pointless lines of code to deal with that namespace.
And people defending XML namespaces will appear in 3, 2, 1...
TBH at one point I thought the XML/XSLT combination for generating html server and clientside would be the next big thing, it was amazing for me, much, much better than jQuery.tmpl or any other js templating language as it acted identically on server/client. Unfortunately non-trivial XSLTs are a little much for many programmers to grok, you have to be able think functional. People want their loops. So I've given up on them as too high maintenance (even I had trouble reading xslts I'd written even a month ago).
I do prefer json to xml now though.
- masklinn 15y ago> And people defending XML namespaces will appear in 3, 2, 1... 0. I don't really like XML (and most stuff around XML), but I rather like XML namespaces. Not all of them, mind you, but my issues mostly have to do with default namespaces and the way they're treated on elements versus attributes. All-in-all, XML namespaces solve real issues in rather smart a manner. Now tooling access to XML namespaces is a completely different bucket of filth, most APIs and XML-related stuff don't fare well there. > Unfortunately non-trivial XSLTs are a little much for many programmers to grok, you have to be able think functional. To think shit functional. Functional without real functions, with broken scoping, with an implicit state throughout, ... A "functional" language where you need something like 6 likes to write a recursive function which does nothing but recurse is closer to dysfunctional. XSLT had a smart idea (only one) in XPath-selected templates, but the whole implementation is garbage. > People want their loops. XSLT has loops. It's not loops which throw people off, it's the unreadable verbosity and having to jump through hoops in order to do the simplest processing. It is also hard (as in, you need quite a bit of experience) to create anything even remotely reusable, and even then XSLT has no modularity worth speaking about. And the namespace handling is a mess.
- aerique 15y agoI've written an XML to RTF converter using XSLT 1.0 (does CALS tables as well!) back in the day at the place I still work at. The pain!
- 6ren 15y agoThe keys things about XSLT are that it exists and it works: it's better than nothing. I agree it's horrible to use e.g. "if (i<10)" are you kidding me? Though, many people use a graphical front end to generate it these days (mapforce, biztalk mapper, stylus studio, IBM and Oracle have their own - there's even a free one with an online demo http://jamper.sourceforge.net/ http://jamper.sourceforge.net/). I think several healthy businesses supplying a GUI for XSLT suggests two things: 1. there's a need for what XSLT does; and 2. XSLT sucks Of course, it could be that GUIs indicate a kind of disruption - making a difficult technology simpler to use, and therefore accessible by less-skilled people (or skilled people with less time). The potential disruptees are the XSLT experts (who in turn displaced people who wrote manual transformers, before XSLT). Having said all that: there isn't anything comparable for JSON. And yet, communication between different apps - or even communication between different versions of the same app - is pretty much a given.