Hacker News new | ask | show | jobs
by eponeponepon 4481 days ago
Document markup is the one place XML is a no-brainer - more specifically, long-form, highly structured documents (i.e., essentially books).

Without it, publishing would be stuck in a morass of nebulous, ill-documented proprietary messes, and a great deal of current learning would be at risk of being lost to posterity. The fact that there are associated open standards such as XSLT with which to transform it is just the icing on the cake as far as publishing is concerned.

This is why there's so much distaste for XML - people try to use it for applications where it isn't ideal (and there are many more of those than there are applications where it is ideal) because they've swallowed someone else's hype, and as a consequence they have a bad time. If not for the unbelievable exaggeration a few years back (I heard people claim without irony that XML - a markup language for god's sake - would literally change the world), the divisiveness wouldn't exist, and it would be a technology used by experts quietly getting on with the jobs it's best for.

2 comments

>Document markup is the one place XML is a no-brainer

That's only true for minimally formatted documents. For anything that approaches professional typesetting requirements, XML is a nightmare.

By far the biggest problem, it the requirement that inner elements must be closed before outer ones can be. This frequently means that the software must do a huge amount of read-ahead to figure out which aspect of the formatting changes first to make that formatting element innermost.

Sometimes, that's simply not possible to arrange and so you have to close a whole bunch of elements and then reopen all but one of them.

All this because a constraint of the format.

Ideal formats, such as used by typesetting systems that don't use XML, allow you to say: keep this formatting trait on until it's switched off. There is no concept of every element needing to be a subset of its encompassing element.

<startbold/>asdf<startitalic/>qwerty<endbold/>123<enditalic/>
Yeah, we're still well in the backlash phase of XML's hype cycle.

I just hope that opinion of it as a markup language can be rehabilitated before someone reinvents it and kicks off a new hype cycle.