Hi folks,
another thing I'm trying to solve while working on a XQuery web app. What kind of templating system do you use to separate HTML templates from the rest of your code?
- XSLT - the only problem I have with this is performance. I tested the XSLT Module with Saxon 9 and a primitive page and it was more than 3x slower compared to pure XQuery templates (XQuery fn taking $model). Other than that I think it's the best built-in option. I actually don't have any users-per-second expectations and those templates will be quite small... do I overemphasize the perf. question?
- pure XQuery - not aimed at templating at all and it shows I'm afraid... just can't come up with a solution that would be clean enough (plus HTML, JS & CSS highlighting withing xq files is not good at all, at least in Vim)
- I looked at Mustache.xq and quite liked it - depends on MarkLogic though :(
- Any hidden gem I haven't googled yet?
Leaning towards XSLT right now... Daniel
-- danielkvasnicka.net