2009-05-11

Pesky operands

Unlike ZPT, Chameleon relies on the venerable expat parser. It's not forgiving in the slightest and won't parse a "<" character that isn't part of a tag (as often used in an inline Javascript for-loop). Often times we can't make assumptions on the document mode, which rules out CDATA. We're not spoilt for choice. Then I stumbled upon a clever workaround: Reverse the operands and invert the operator, then it just works.

0 comments: