When comparing lit-html vs XSLT in-browser implementation, the Slant community recommends lit-html for most people. In the question“What are the best JavaScript templating engines?” lit-html is ranked 12th while XSLT in-browser implementation is ranked 31st. The most important reason people chose lit-html is:
It's powered by a JS-feature called tagged template literals. No JSX. Manipulate templates as strings with all the power of JavaScript available to you.
Ranked in these QuestionsQuestion Ranking
Pros
Pro It's just JavaScript
It's powered by a JS-feature called tagged template literals. No JSX. Manipulate templates as strings with all the power of JavaScript available to you.
Pro Permits pipelining
I.e. apply one template on top of another.
Pro AOP model
With ability to split feature implementation apart from main codebase, development became quite more manageable. Example: for data of particular type you could define own rendering or render refine rules; pipelining allows incrementally change UI by adding/removing elements depend of parameters, data values, previously rendered content.
Pro Native multithreaded implementation
Only template engine which utilizes multithreading.
Pro Native pre-compilation available
In some browsers(IE) XSLT during load is compiled into DLL. In others pre-loaded template allows to skip recurring parsing .
Pro Accept native data out of JS heap
XML when stored, saved outside of JS heap, capable to work with amount of data 100x larger of JSON.
Pro Native implementation
Supported in all browsers, starting from IE5.
Pro Server side rendering
XSLT is available as in browser as on server side via various libs including highly optimized for CPU.
Cons
Con Lack of SDLC for in-browser development
It will take time to collect complete gentleman set: debugging, modular development, documenting, unit tests, etc. Please share if know the book on subject.
Con Verbose syntax
Takes time to get used to.
Con AOP model
Is complex to comprehend, justifiable on complex projects.