[Request for feature] Problem with ClearSilver syntax
"Léo Gillot-Lamure" <[email protected]> Thu, 28 Aug 2008 01:04:37 +0200
| Newsgroups | gmane.text.clearsilver.general |
|---|---|
| Message-ID | <[email protected]> |
Hello. I'm using ClearSilver within XML documents, and it makes a problem : CS uses XML's processing instructions, and these are illegal in attributes (<a href="<?cs var:item.url ?>"> is not well-formed). It's problematic in many cases : XML and XHTML tools (editors, WYSIWYGs...) have an undefined (and often bad) behaviour (so it's not good for web designers), and stuff like XSLT or DOM libs make a fatal error. Two solutions would be possible : - Having a syntax like <a><?cs attr:href=var:item.url ?>A link</a> (which would make <a href="(value of item.url)">A link</a>), but it's probably too complicated, and not in the logic of CS. - Simply be able to use something else than <? and ?> (I think this is not a good choice to use XML's processing instructions, this is often simply inherited from PHP). ClearSilver seams to be the last good and light template engine in Java : Velocity or others are too complicated, too less restrictive (you can add Java code within)... I quickly looked at the code of CS, but I'm newbie at C and it's too hardcore for me... (but it's surely why this is so fast ;). So, is a feature in this way planned, or are there coders motivated to do something like that ? Thanks for future responses (and please to excuse my probably crap english ^^). Léo Gillot-Lamure.