Hi, I think TAL ( http://en.wikipedia.org/wiki/Template_Attribute_Language ) would be the perfect match. There are some implementations in XSL and Javascript. Converting the templates to XQuery shouldn't be too hard either. Concerning performance - IMHO XSL is fast enough. In the end it's most likely not your templating engine that slows down your application. Regards, Max PS: another xsl version not listed on Wikipedia: https://bitbucket.org/bkclements/tal2xslt/overview 2012/11/17 Daniel Kvasnička <daniel.kvasnicka@me.com>:
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
_______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
-- Maximilian Gärber axxepta solutions GmbH Postfach 51 02 38 13362 Berlin Tel +49 (0)30 499 147 66 Fax +49 (0)30 499 147 67 Mail gaerber@axxepta.de