> As I said, this is all easier to do with XML, but the OP said: > > : (and i don't want to hear anything about xsl - xsl is a decent > : templating language for xml, NOT html and it doesn't work - i want a > : friendly syntax like this.)
That, to me, sounds like someone who would rather do something without learning anything new, rather than using the correct tool for the job. > I'm not saying it's a /good/ idea, I'm just attacking the notion that > it's a completely nonsensical idea. Well. Reimplementing TT2 in js *IS* a completely nonsensical idea, due to the way it works.. (re: my comment previously about reimplementing perl in js ;)) Even if you ignore the fact that TT2 is heavily connected to perl it's still a pretty dumb idea, since js already has access to functions to parse documents as html or xml quickly and efficiently it would be, in my view, foolish to just ignore that and start developing something that will be crippled before you even start.. > Google seem to have got it working pretty well. I'm pretty sure google do not have their pages split up into multiple files that are called individually via xmlhttp and combined into a single document in the client.. that would be horribly inefficient. Generally these client-side apps tend to either render the entire UI with JS, or serve the UI as a complete page from the server, then load the data in as xml (or whatever) and apply it to the page > Lots of languages don't have a CPAN-like library of code. People still > use them quite effectively. I was actually referring to, for instance, a parser, like YAPP, or something so you didn't have to rely on parsing with regexes.. (does js even support the neccassary extensions to match nested, balanced delimiters?), the problem is there's relatively little good, widely-used 'library' code out there in js (although I suppose you could count .NET), simply because in that environment it often makes sense to 're-invent the wheel' rather than having to serve huge lumps of library code to each client. > If the computer industry couldn't use names that have been previously > used, we wouldn't have Windows, or Oracle, or Java, or ... hmmm. This is > sounding better by the minute ... Hehehe, yeah but none of those sound quite so utterly stupid, I was hoping someone would nip it in the bud and come up with something better, but it seems i'm a bit late ;) _______________________________________________ templates mailing list [email protected] http://lists.template-toolkit.org/mailman/listinfo/templates
