3 ms·
I use XML/XSLT to transform data into multiple output formats (currently XHTML and ConTeXT/PDF): https://recipefiddle.com/recipe/15316/truffles https://recipef
by thangalin 12y ago
I use XML/XSLT to transform data into multiple output formats (currently XHTML and ConTeXT/PDF):
https://recipefiddle.com/recipe/15316/truffles https://recipefiddle.com/recipe/15316/truffles (web page)
http://i.imgur.com/T71WhDJ.png http://i.imgur.com/T71WhDJ.png (editor)
https://recipefiddle.com/book/examples/recipefiddle_sweet_treats_ebook.pdf https://recipefiddle.com/book/examples/recipefiddle_sweet_tr... (printable ebook)
https://recipefiddle.com/book/examples/recipefiddle_sweet_treats_cards.pdf https://recipefiddle.com/book/examples/recipefiddle_sweet_tr... (recipe cards)
Each recipe was created from the same XML recipe data, transformed using two different templates. To my knowledge, JSON cannot be directly transformed into *TeX, but XML can.
To achieve the similar results with JSON, you'd have to first transform it to YAML, then Pandoc, then LaTeX, then finally PDF. Then you'd have to use a different infrastructure to render JSON as XHTML.
Architecturally, in this case, XML/XSLT is the simpler solution. If you only care about mobile apps, and don't need to create beautiful ebooks, then XML/XSLT is not a good choice.