<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Genshi: the best template language in Python right now</title>
	<atom:link href="http://www.blueskyonmars.com/2006/09/20/genshi-the-best-template-language-in-python-right-now/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blueskyonmars.com/2006/09/20/genshi-the-best-template-language-in-python-right-now/</link>
	<description>Kevin Dangoor on Technology, Business and Everything</description>
	<pubDate>Fri, 25 Jul 2008 10:22:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Twey</title>
		<link>http://www.blueskyonmars.com/2006/09/20/genshi-the-best-template-language-in-python-right-now/#comment-207833</link>
		<dc:creator>Twey</dc:creator>
		<pubDate>Sun, 06 Jan 2008 13:27:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.blueskyonmars.com/2006/09/19/genshi-the-best-template-language-in-python-right-now/#comment-207833</guid>
		<description>Hm, nothing wrong with "genshi" as a name.  I think it sounds quite snazzy.</description>
		<content:encoded><![CDATA[<p>Hm, nothing wrong with &#8220;genshi&#8221; as a name.  I think it sounds quite snazzy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel</title>
		<link>http://www.blueskyonmars.com/2006/09/20/genshi-the-best-template-language-in-python-right-now/#comment-90700</link>
		<dc:creator>Joel</dc:creator>
		<pubDate>Sat, 06 Jan 2007 21:49:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.blueskyonmars.com/2006/09/19/genshi-the-best-template-language-in-python-right-now/#comment-90700</guid>
		<description>Actually, Genshi is a good name, mostly because it can be easily googled with little room for ambiguity and it rolls off the tongue rather nicely.  Think about it, why did Amazon go with THAT name!!! What on earth does a river in south america have to do with selling books online?!!
So, if Genshi really takes off, it WILL be a good name, by definition.
And it was probably fairly easy to get the domain.</description>
		<content:encoded><![CDATA[<p>Actually, Genshi is a good name, mostly because it can be easily googled with little room for ambiguity and it rolls off the tongue rather nicely.  Think about it, why did Amazon go with THAT name!!! What on earth does a river in south america have to do with selling books online?!!<br />
So, if Genshi really takes off, it WILL be a good name, by definition.<br />
And it was probably fairly easy to get the domain.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred Drake</title>
		<link>http://www.blueskyonmars.com/2006/09/20/genshi-the-best-template-language-in-python-right-now/#comment-87151</link>
		<dc:creator>Fred Drake</dc:creator>
		<pubDate>Wed, 20 Dec 2006 06:31:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.blueskyonmars.com/2006/09/19/genshi-the-best-template-language-in-python-right-now/#comment-87151</guid>
		<description>Note that XPath can be extended with additional functions in specific applications.  This is done in both XSLT and XPointer, and is acknowledged in the XPath specification:

http://www.w3.org/TR/1999/REC-xpath-19991116#section-Introduction

This may provide a reasonable way to deal with the class attribute value; a has-token(token[, string]) function may be easier to read than some regular-expression mess.</description>
		<content:encoded><![CDATA[<p>Note that XPath can be extended with additional functions in specific applications.  This is done in both XSLT and XPointer, and is acknowledged in the XPath specification:</p>
<p><a href="http://www.w3.org/TR/1999/REC-xpath-19991116#section-Introduction" rel="nofollow">http://www.w3.org/TR/1999/REC-xpath-19991116#section-Introduction</a></p>
<p>This may provide a reasonable way to deal with the class attribute value; a has-token(token[, string]) function may be easier to read than some regular-expression mess.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Smith</title>
		<link>http://www.blueskyonmars.com/2006/09/20/genshi-the-best-template-language-in-python-right-now/#comment-68573</link>
		<dc:creator>Jason Smith</dc:creator>
		<pubDate>Sat, 23 Sep 2006 06:19:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.blueskyonmars.com/2006/09/19/genshi-the-best-template-language-in-python-right-now/#comment-68573</guid>
		<description>That looks a lot like Cheetah!</description>
		<content:encoded><![CDATA[<p>That looks a lot like Cheetah!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shannon -jj Behrens</title>
		<link>http://www.blueskyonmars.com/2006/09/20/genshi-the-best-template-language-in-python-right-now/#comment-68553</link>
		<dc:creator>Shannon -jj Behrens</dc:creator>
		<pubDate>Sat, 23 Sep 2006 01:39:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.blueskyonmars.com/2006/09/19/genshi-the-best-template-language-in-python-right-now/#comment-68553</guid>
		<description>I've totally fallen in love with Genshi!  I learned it between midnight and 2AM one night.  By the next day, I was totally productive and totally loving it!  I like the fact that template inheritance works so easily, and I love the XPath stuff.  It's weird--Genshi is like a superset of all the templating engines, but in a way that is conceptually simple and elegant.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve totally fallen in love with Genshi!  I learned it between midnight and 2AM one night.  By the next day, I was totally productive and totally loving it!  I like the fact that template inheritance works so easily, and I love the XPath stuff.  It&#8217;s weird&#8211;Genshi is like a superset of all the templating engines, but in a way that is conceptually simple and elegant.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher Lenz</title>
		<link>http://www.blueskyonmars.com/2006/09/20/genshi-the-best-template-language-in-python-right-now/#comment-68524</link>
		<dc:creator>Christopher Lenz</dc:creator>
		<pubDate>Fri, 22 Sep 2006 18:03:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.blueskyonmars.com/2006/09/19/genshi-the-best-template-language-in-python-right-now/#comment-68524</guid>
		<description>Aaron, I see a number of ways to address that requirement:

(a) Genshi could add support for the XPath 2 matches() function, which would allow you to match a class name on word boundaries using regular expressions.

(b) Providing an extended XPath engine that would also support the "elem#id" and "elem.class" syntax that is well-known from CSS selectors. Similar to what jQuery does.

Please do post any match template examples that aren't well suited for XPath to the Genshi mailing list, so we can work on addressing them.</description>
		<content:encoded><![CDATA[<p>Aaron, I see a number of ways to address that requirement:</p>
<p>(a) Genshi could add support for the XPath 2 matches() function, which would allow you to match a class name on word boundaries using regular expressions.</p>
<p>(b) Providing an extended XPath engine that would also support the &#8220;elem#id&#8221; and &#8220;elem.class&#8221; syntax that is well-known from CSS selectors. Similar to what jQuery does.</p>
<p>Please do post any match template examples that aren&#8217;t well suited for XPath to the Genshi mailing list, so we can work on addressing them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tazzzzz</title>
		<link>http://www.blueskyonmars.com/2006/09/20/genshi-the-best-template-language-in-python-right-now/#comment-68509</link>
		<dc:creator>tazzzzz</dc:creator>
		<pubDate>Fri, 22 Sep 2006 15:49:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.blueskyonmars.com/2006/09/19/genshi-the-best-template-language-in-python-right-now/#comment-68509</guid>
		<description>Christopher: I agree that the plugin API needs improvements (I think everyone does :). I'd go with the separate plugin class route right now (genshi-text). It will still be relatively less used than "normal" genshi templates.

Aaron: Perhaps what's needed is an extension mechanism to easily add functions for the paths (probably with some common additions like the use of split that you're suggesting).

I like the XPath syntax in general for what it specifies, but I agree that there are cases where you need to select something outside the realm of what XPath gives you.</description>
		<content:encoded><![CDATA[<p>Christopher: I agree that the plugin API needs improvements (I think everyone does :). I&#8217;d go with the separate plugin class route right now (genshi-text). It will still be relatively less used than &#8220;normal&#8221; genshi templates.</p>
<p>Aaron: Perhaps what&#8217;s needed is an extension mechanism to easily add functions for the paths (probably with some common additions like the use of split that you&#8217;re suggesting).</p>
<p>I like the XPath syntax in general for what it specifies, but I agree that there are cases where you need to select something outside the realm of what XPath gives you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Bentley</title>
		<link>http://www.blueskyonmars.com/2006/09/20/genshi-the-best-template-language-in-python-right-now/#comment-68506</link>
		<dc:creator>Aaron Bentley</dc:creator>
		<pubDate>Fri, 22 Sep 2006 15:33:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.blueskyonmars.com/2006/09/19/genshi-the-best-template-language-in-python-right-now/#comment-68506</guid>
		<description>Genshi looks like a step forward in a lot of ways, the the use of XPath in match templates looks like a step backwards to me.  I already have lots of match rules that look hard to implement with XPath, starting with:

def has_class(item, classname):
    return classname in (item.attrib.get('class', '').split(' '))

XPath doesn't seem to handle the fact that class is actually a space-separated list of class names very well.</description>
		<content:encoded><![CDATA[<p>Genshi looks like a step forward in a lot of ways, the the use of XPath in match templates looks like a step backwards to me.  I already have lots of match rules that look hard to implement with XPath, starting with:</p>
<p>def has_class(item, classname):<br />
    return classname in (item.attrib.get(&#8217;class&#8217;, &#8221;).split(&#8217; &#8216;))</p>
<p>XPath doesn&#8217;t seem to handle the fact that class is actually a space-separated list of class names very well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher Lenz</title>
		<link>http://www.blueskyonmars.com/2006/09/20/genshi-the-best-template-language-in-python-right-now/#comment-68501</link>
		<dc:creator>Christopher Lenz</dc:creator>
		<pubDate>Fri, 22 Sep 2006 12:18:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.blueskyonmars.com/2006/09/19/genshi-the-best-template-language-in-python-right-now/#comment-68501</guid>
		<description>Damjan: unfortunately, Genshi text templates are currently not available through the TurboGears plugin mechanism.

We have discussed how this could be implemented, and one obvious solution would be to actually provide *two* plugin classes (one for markup templates and one for text templates). Then you'd use something like "genshi-text:myapp.foo.templates" to specify the template in @expose. That doesn't seem all that elegant.

The other option may be to switch to text templates implicitly if the output format is set to "text". I'm not sure whether that's a good idea, as it is not really explicit.

Input from TG wizards very much welcome!

In any case, better support for Genshi in TG is going to require some improvements of the plugin API in the long term, such as adding search paths, not having to hardcode the filename extension, and some way of selecting a template type.</description>
		<content:encoded><![CDATA[<p>Damjan: unfortunately, Genshi text templates are currently not available through the TurboGears plugin mechanism.</p>
<p>We have discussed how this could be implemented, and one obvious solution would be to actually provide *two* plugin classes (one for markup templates and one for text templates). Then you&#8217;d use something like &#8220;genshi-text:myapp.foo.templates&#8221; to specify the template in @expose. That doesn&#8217;t seem all that elegant.</p>
<p>The other option may be to switch to text templates implicitly if the output format is set to &#8220;text&#8221;. I&#8217;m not sure whether that&#8217;s a good idea, as it is not really explicit.</p>
<p>Input from TG wizards very much welcome!</p>
<p>In any case, better support for Genshi in TG is going to require some improvements of the plugin API in the long term, such as adding search paths, not having to hardcode the filename extension, and some way of selecting a template type.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damjan</title>
		<link>http://www.blueskyonmars.com/2006/09/20/genshi-the-best-template-language-in-python-right-now/#comment-68443</link>
		<dc:creator>Damjan</dc:creator>
		<pubDate>Fri, 22 Sep 2006 01:05:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.blueskyonmars.com/2006/09/19/genshi-the-best-template-language-in-python-right-now/#comment-68443</guid>
		<description>Kevin a question, 
how do you specify in TG with the @template decorator that a TextTemplate should be used? Or genshi will automatically know what template to use for (template="genshi:.templates.text") ?</description>
		<content:encoded><![CDATA[<p>Kevin a question,<br />
how do you specify in TG with the @template decorator that a TextTemplate should be used? Or genshi will automatically know what template to use for (template=&#8221;genshi:.templates.text&#8221;) ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.799 seconds -->
