News for hackers. Stuff that matters.
Re:A Brief Defense of XML by mattpallissard on Friday January 06, 2023 @09:56AM (#34275276)
Many people "love yaml" and "hate XML" but never dealt with XSD, so they don't even realize what they're talking about syntax instead of functionality.

Admittedly, XML isn't the most pleasant syntax to interact with by hand.

Re:A Brief Defense of XML by Devasta on Friday January 06, 2023 @12:00PM (#34277318)
XML syntax is fine so long as you're using a proper IDE. I manage a team of reporting analysts and all of them come from Business Analyst or Accountancy backgrounds; they write and maintain XSLT transforms just fine, once they spend a day or two getting used to IntelliJ IDEA.
Re:A Brief Defense of XML by crispyambulance on Friday January 06, 2023 @08:15PM (#34283909)
XML was a great idea. At some point in the early naughts, however, XML-abuse became rampant-- too many crappy tools, too many half-assed attempts at putting square pegs into round holes. It didn't help that XML got inextricably associated with those horrible over-complicated ws-* standards that ended up sending Russian novel-sized "hello world" information exchanges.

The main idea, however, was wonderful. An information exchange format (xml itself), a way to define schemas (xsd), a transformation language (xslt), and stylesheets (xsl?). I kind of miss it.

Re:A Brief Defense of XML by dragonwriter on Friday January 06, 2023 @09:36PM (#34284508)
XSL (Extensible Stylesheet Language) the stylesheet part, it included XSLT (transform), XPath, and XSL-FO (XSL Format Objects).

XSLT and XPath each went on to great solo careers, XSL-FO kind of fizzled when XML+XSL failed to displace HTML+CSS.

Re:A Brief Defense of XML by spiralx on Saturday January 07, 2023 @10:37AM (#34288963)
XSL:FO is great for turning into PDFs though.

There's also XQuery for transformations and XSD/RelaxNG for schemas, the whole combination of XML database, WYSIWYG (via XSLT) XML editor and output transformations is very powerful, every journal we published and every site we ran at the British Medical Journal was generated that way.

Re:A Brief Defense of XML by giantrobot on Friday January 06, 2023 @10:00PM (#34284669)
I miss XSLT every time I see megabytes of JavaScript converting some JSON into a soup of HTML to display in browsers. A bunch of JavaScript with a bunch of overwrought "components" is serving as a very complicated templating system.

A lot of really stupid JavaScript could be done fairly easily with XSLT natively inside a browser engine. An XML document can point to its own XSL(s) so get rendered to the appropriate delivery format or just used directly as data.

Re:A Brief Defense of XML by phoehne on Friday January 06, 2023 @10:35PM (#34284882)
I don't miss it. I had several projects where it seemed like a good idea. I pushed it as a good idea. I really wanted it to work. Some developers (usually the sharper bulbs) got it. A lot of developers really struggled with it. Especially the folks who were 'front end' developers. Even in the 2000's, when everything was trying to go XML, staffing those roles was hard.
Re:A Brief Defense of XML by giantrobot on Friday January 06, 2023 @11:22PM (#34285167)
Tooling was XSLT's Achilles heel. Too many tools had no or poor XSLT support. What's confusing to me is a lot of the JavaScript templating today has equally bad tooling yet everyone's in love with it.
Re:A Brief Defense of XML by waldir on Saturday January 07, 2023 @07:54AM (#34287605)
Doesn't that suggest that tooling wasn't the issue after all?
Re:A Brief Defense of XML by giantrobot on Saturday January 07, 2023 @03:19PM (#34292266)
The lack of tooling for XSLT and modern JavaScript stuff are on different sides of the adoption curve. XSLT lacked tooling on the upside of the curve so it never hit critical mass. Its other problems could have been solved had it hit critical mass and seen wider adoption.
Re:A Brief Defense of XML by dragonwriter on Friday January 06, 2023 @09:28PM (#34284450)
> Many people "love yaml" and "hate XML" but never dealt with XSD, so they don't even realize what they're talking about syntax instead of functionality.

No, I'm pretty sure that if they have only used XML syntax as a data rep and not XML-associated tooling like XSD, they are quite aware that when thet say they hate XML they are talking about syntax.

OTOH. I am surprised at the number of people that seem to thing “has a schema language that can be used to specify structure beyond just the basic raw language” distinguishes XML from other data representation languages.

Or, more generally, the way that “if you don’t like XML, maybe your problem is you aren’t using enough of it” has become an edgy contrarian position rather than steretypical establishment enterprise consultant thing it was 15 or so years ago.