Hello, I have been using John Resig's micro-templating script in the last weeks to manage js templates. Resig's code is lightweight and simply requires the template to be inserted in a script container of type "text/html". It turns out that this yields fairly numerous XHTML Transitional compliance errors if the template becomes complex (Among other things, invalid attributes, etc.).
I tried to wrap the code within CDATA tags, change the markers ( ie <,> to [[,]] ) to no avail except for one browser. Strangely enough, removing CDATA tags from the script template via Regex or substituting brackets works in FF 3+ but not in IE 7+, Chrome, Opera 9+, Safari 4, etc. Is there a way to make Resig's template implementation XHTML compliant or should I switch to a different approach? TIA.