4 ms·
It turns out "pull" templating matches the mental model of most people much better, is easier to understand, and is in particular useful for ye olde typical web
by jamesbritt 13y ago
It turns out "pull" templating matches the mental model of most people much better, is easier to understand, and is in particular useful for ye olde typical website.
And for that I found I was happier using a streaming parser and writing event handlers to grab data as it went by and formatting as needed in my handler code.
XSLT might be a good fit if your logic depends on whole-document handling. For example, you need to know how many foo elements there are in order to generate a TOC. Or something where you're explicitly working of irregularities and optional data so you need to have the whole XML doc at hand and apply your transformations "all at once" so to speak.