I will risk that this will be an unpopular opinion, but if you are having problem with XML, you are using it to solve the wrong problem. I understand writing XSLT and XML Schema can be difficult and I see how typing out XML namespaces can be a pain, but every sentence about XML in that article is a joke. Those quotes are all intended to be funny, not objective. Noone actually brought an objective facts against XML. B…
Objective facts: * XML is complicated enough that its parsers are commonly full of obscure bugs. JSON/YAML doesn't have this problem. * XML is complicated enough that its parsers can have security vulnerabilities (e.g. see billion laughs for just one ). JSON/YAML doesn't have this problem. * XML is complicated enough that you can create an almost-but-not-quite valid encoding. The (already complicated enough) parsers…
XSLT is a failure wrapped in pain
111–120 of 157 posts
Re: XSLT is a failure wrapped in pain
#112The problems that XML and XSLT address have not gone away. It saddens me when the XML-hating JSON community starts reinventing solutions that have all the same issues of bloat and complexity (see JSON schema, Collection+JSON, Siren, etc). I would not be surprised if someone soon announces a "JSON Transformation" tool that can convert one JSON schema to another. Followed shortly by a standard for JSON namespaces so yo…
Its a generational thing. Programmers grown up on JavaScript will prefer JSON. Its not a unique phenomenon. My guess is the noSQL was born out of fact that many young programmers simply don't know how to write SQL, if they don't know/want to use SQL and rely on ORM mapping alone, then they can as well do away with SQL databases too.
Until that whole leaky abstraction problem kicks in.
Re: XSLT is a failure wrapped in pain
#113Earlier quoted context omitted.
Objective facts: * XML is complicated enough that its parsers are commonly full of obscure bugs. JSON/YAML doesn't have this problem. * XML is complicated enough that its parsers can have security vulnerabilities (e.g. see billion laughs for just one ). JSON/YAML doesn't have this problem. * XML is complicated enough that you can create an almost-but-not-quite valid encoding. The (already complicated enough) parsers…
YAML allows deserialization into arbitrary native types, which most definitely is [1] an issue (see: the flood of Rails/YAML vulns a while back) [1] http://blogs.teamb.com/craigstuntz/2013/02/04/38738/
I think it's really dumb that most YAML libraries have a load() and a safe_load(). If they had a load() and a dangerous_load() then the problem basically wouldn't exist.
Re: XSLT is a failure wrapped in pain
#114Earlier quoted context omitted.
Objective facts: * XML is complicated enough that its parsers are commonly full of obscure bugs. JSON/YAML doesn't have this problem. * XML is complicated enough that its parsers can have security vulnerabilities (e.g. see billion laughs for just one ). JSON/YAML doesn't have this problem. * XML is complicated enough that you can create an almost-but-not-quite valid encoding. The (already complicated enough) parsers…
XML is very simple. Maybe YAML is simpler but both are very simple. XML is tedious to write, verbose and repetitive, but not complicated nor complex. XSLT is also conceptually very simple. XML, XML schema tools and XSLT make a very powerful combination that has proven to be useful in a myriad of real world problems.
Re: XSLT is a failure wrapped in pain
#115Earlier quoted context omitted.
My definition of powerful and elegant is lisp XML is just death by overengineering
> My definition of powerful and elegant is lisp Dude, XML is just s-exprs and XSLT is macros.
No. That myth has been decisively addressed by Erik Naggum about 12 years ago. His summary:
> They are not identical. The aspects you are willing to ignore are > more important than the aspects you are willing to accept. Robbery > is not just another way of making a living, rape is not just another > way of satisfying basic human needs, torture is not just another way > of interrogation. And XML is not just another way of writing S-exps. > There are some things in life that you do not do if you want to be a > moral being and feel proud of what you have accomplished.
Please read his posting/rant for the arguments. Dude. (I'll just tell you to search for "naggum xml", there are more than enough copies in circulation, and you'll find a few more postings by other people.)
Now, as for XSLT: The big problem is the hairy syntax. It is really (at least) two languages (the XML tags, and the query language that is used inside selectors). In effect, you are writing at least three languages completely intermixed in a single file: the output language (most often some XML or HTML variant), the XSLT tag language (another XML format), and the XSLT query language (an incredibly limited ad hoc micro-language inside some XML attributes).
XSLT is a very limited language, as opposed to Lisp macros, which can use the entire Lisp language.
And yes, I have used XSLT in my job, and I do have reason to think that the XSLT-stylesheets I wrote have an acceptable quality. However, I know that I could have done their job better if I could have used some structured data, an HTML formatter, and a real programming language.
Re: XSLT is a failure wrapped in pain
#116The problems that XML and XSLT address have not gone away. It saddens me when the XML-hating JSON community starts reinventing solutions that have all the same issues of bloat and complexity (see JSON schema, Collection+JSON, Siren, etc). I would not be surprised if someone soon announces a "JSON Transformation" tool that can convert one JSON schema to another. Followed shortly by a standard for JSON namespaces so yo…
Its a generational thing. Programmers grown up on JavaScript will prefer JSON. Its not a unique phenomenon. My guess is the noSQL was born out of fact that many young programmers simply don't know how to write SQL, if they don't know/want to use SQL and rely on ORM mapping alone, then they can as well do away with SQL databases too.
Not really, JSON is a simpler format with better parsing built-in for most languages. It is easier to use for programmers and performs better across the network.
This is as true today as it was true 7-years ago when I wrote this article: https://mkaz.com/2007/03/02/goodbye-xml-hello-json/
Re: XSLT is a failure wrapped in pain
#117Earlier quoted context omitted.
I was a bit unclear. When I get database dumps, I get them as Excel files or as an XML document. Most of the times the documents I get are hierarchically structured. Yes, JSON could be fine as well. But it simply lacks a standard toolchain which XSLT ans its ilk proides. I am not trying to defend XML in any way. I just want to say the two things: a) my customers never deal with JSON, but often with XML, so JSON (and…
But XML does not map well to a database dump. A database is a set of sets of tuples. It is not generically hierarchical. It maps to a set of csv files say, as a transfer medium, but it is designed to be manipulated through relational calculus, which is not easily mapped to xslt. You are using tools not because they map well to the problem space, but because they are the tools you have, which your customers want, and…
Re: XSLT is a failure wrapped in pain
#118Earlier quoted context omitted.
If we eliminated everything where implementations have had obscure bugs or security vulnerabilities, there would literally be nothing left. XML's complexity does not give you any additional benefit over YAML or JSON. This is so incredibly wrong, on every level, that it belies belief and reads like something you would come across on a "beginning programmers" forum. As others have said, JSON/YAML thus far have seen lim…
>If we eliminated everything where implementations have had obscure bugs or security vulnerabilities, there would literally be nothing left. The point is that by eliminating this data format you get rid of those obscure bugs and security vulnerabilities and you lose nothing of value doing it. >This is so incredibly wrong, on every level, that it belies belief and reads like something you would come across on a "begin…
Re: XSLT is a failure wrapped in pain
#119One quote sums it up: “XML is simply lisp done wrong.” – Alan Cox It's not that XSLT isn't useful in some situations. It is. It's not that clean, simple and efficient XSLT is impossible. It is, but it's hard. The fact that it isn't Turing complete can be a good thing. It can also cause a lot of headaches. The main problem is that XSLT as designed and as implemented is an over-engineered god-awful mess. XSLT 2 was a h…
It is a functional language, probably one of the reasons people don't like it.