Hacker News new | ask | show | jobs
by nly 4481 days ago
I personally miss having schemas and XSLT in JSON.

> doing everything in XML is a stupid idea (e.g. XSLT and Ant)

XSLT actually made a lot of sense. If everyone writes code to transform format1 to format2 then what you end up with a lot of slightly different transformations. Its main downfall, just like XML itself, was that it was annoying and time consuming to write.

How would you replace all this if you moved away from XML?

http://git.hohndel.org/?p=subsurface.git;a=tree;f=xslt;hb=HE...

3 comments

> Its main downfall, just like XML itself, was that it was annoying and time consuming to write.

And impossible to debug. Write once, do something else for some weeks, and trying to understand what you were doing at a later point is nearly impossible.

There are schemas in JSON (see, for example, Kwalify) although they are not something that is built into the specification. I don't think the equivalent of XSLT is as necessary when the document readily translates to data structures in a scripting language.
> it was annoying and time consuming to write.

It remains annoying and time-consuming :) But there's no better option for reliably creating valid EPUBs to a predetermined business specification.