<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Web Services Infrastructure: Kid Templating</title>
	<atom:link href="http://www.blueskyonmars.com/2005/09/27/web-services-infrastructure-kid-templating/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blueskyonmars.com/2005/09/27/web-services-infrastructure-kid-templating/</link>
	<description>The Nuts and Bolts of Creating Great Software Products</description>
	<lastBuildDate>Wed, 21 Jul 2010 17:19:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: tazzzzz</title>
		<link>http://www.blueskyonmars.com/2005/09/27/web-services-infrastructure-kid-templating/comment-page-1/#comment-2773</link>
		<dc:creator>tazzzzz</dc:creator>
		<pubDate>Wed, 28 Sep 2005 11:49:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.blueskyonmars.com/2005/09/27/web-services-infrastructure-kid-templating/#comment-2773</guid>
		<description>I think Kid templates work very nicely for this... Here&#039;s a Rails builder:

    xml.response(:code =&gt; @code) do 
      xml.items do
        @items.each do &#124;item&#124; 
          xml.item do
            xml.sku(item.product.sku)
            xml.description(item.product.description)
            xml.unit_price(item.product.list_price, :currency =&gt; &quot;usd&quot;)
            xml.quantity(1)
          end
        end
      end 
    end

    &lt;items&gt;
        &lt;item py:for=&quot;item in items&quot;&gt;
            &lt;sku&gt;${item.product.sku}&lt;/sku&gt;
            &lt;description&gt;${item.product.description}&lt;/description&gt;
            &lt;unit -price&gt;{item.product.list_price(currency=&quot;usd&quot;)}&lt;/unit&gt;
            &lt;quantity&gt;1&lt;/quantity&gt;
        &lt;/item&gt;
    &lt;/items&gt;

It&#039;s basically just the same thing inverted. Rather than a little XML in your Ruby, you get a little Python in your XML :)</description>
		<content:encoded><![CDATA[<p>I think Kid templates work very nicely for this&#8230; Here&#8217;s a Rails builder:</p>
<p>    xml.response(:code =&gt; @code) do<br />
      xml.items do<br />
        @items.each do |item|<br />
          xml.item do<br />
            xml.sku(item.product.sku)<br />
            xml.description(item.product.description)<br />
            xml.unit_price(item.product.list_price, :currency =&gt; &#8220;usd&#8221;)<br />
            xml.quantity(1)<br />
          end<br />
        end<br />
      end<br />
    end</p>
<p>    <items><br />
        <item py:for="item in items"><br />
            <sku>${item.product.sku}</sku><br />
            <description>${item.product.description}</description><br />
            <unit -price>{item.product.list_price(currency=&#8221;usd&#8221;)}</unit><br />
            <quantity>1</quantity><br />
        </item><br />
    </items></p>
<p>It&#8217;s basically just the same thing inverted. Rather than a little XML in your Ruby, you get a little Python in your XML <img src='http://www.blueskyonmars.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Koziarski</title>
		<link>http://www.blueskyonmars.com/2005/09/27/web-services-infrastructure-kid-templating/comment-page-1/#comment-2756</link>
		<dc:creator>Michael Koziarski</dc:creator>
		<pubDate>Tue, 27 Sep 2005 22:11:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.blueskyonmars.com/2005/09/27/web-services-infrastructure-kid-templating/#comment-2756</guid>
		<description>Kevin,

People love our &#039;builder&#039; templates in rails which guarantee valid xml (builder &#039;features&#039; not withstanding).  Perhaps turbogears could use something similar?</description>
		<content:encoded><![CDATA[<p>Kevin,</p>
<p>People love our &#8216;builder&#8217; templates in rails which guarantee valid xml (builder &#8216;features&#8217; not withstanding).  Perhaps turbogears could use something similar?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron</title>
		<link>http://www.blueskyonmars.com/2005/09/27/web-services-infrastructure-kid-templating/comment-page-1/#comment-2755</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Tue, 27 Sep 2005 16:21:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.blueskyonmars.com/2005/09/27/web-services-infrastructure-kid-templating/#comment-2755</guid>
		<description>I was playing with this idea and thinking about how to overload the turbogears.expose decorator to incluide something like:
turbogears.expose(... html=&#039;html.kid&#039; xml=&#039;something.xml&#039; csv=&#039;another&#039;)

then I could have a hook to expose the data in any page in any format. I&#039;m not sure how to resolve the mapping with pretty urls in cherrypy though.

Something like 
site.com/people/aaron -&gt; html
site.com/people/aaron.xml -&gt; xml
vs
site.com/people/aaron -&gt; html
site.com/people/aaron?frmt=xml -&gt; xml</description>
		<content:encoded><![CDATA[<p>I was playing with this idea and thinking about how to overload the turbogears.expose decorator to incluide something like:<br />
turbogears.expose(&#8230; html=&#8217;html.kid&#8217; xml=&#8217;something.xml&#8217; csv=&#8217;another&#8217;)</p>
<p>then I could have a hook to expose the data in any page in any format. I&#8217;m not sure how to resolve the mapping with pretty urls in cherrypy though.</p>
<p>Something like<br />
site.com/people/aaron -&gt; html<br />
site.com/people/aaron.xml -&gt; xml<br />
vs<br />
site.com/people/aaron -&gt; html<br />
site.com/people/aaron?frmt=xml -&gt; xml</p>
]]></content:encoded>
	</item>
</channel>
</rss>

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