I experimented with a John Resig micro-template that works great. However, the margin will not pass the XHTML 1.0 Transitional validation test. (Among other things, id attributes give errors.)
Replacing the tag identifiers <,> with [[,]] is being tested. So I created a js script that, at boot time (a finished jQuery document), converts the square brackets back to regular markers. This works fine in FF, but not in IE, Chrome, etc.
Scripts embedded in CDATA tags are also checked.
Question: Is there a way to insert a micro-template into a script and still pass the XHTML check? My idea was to remove the CDATA tags after the page loaded. But there are probably more reasonable ways. (Note: I would prefer not to inject HTML through js, since markup will be difficult to maintain.)
PS: I looked at other js templates, but they either do not match XHTML, or are too bulky.
TIA for any advice.
mshelv
source
share