<?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: Exploring Ruby CSS parsers: TamTam and CSSPool</title>
	<atom:link href="http://jystewart.net/process/2007/12/exploring-ruby-css-parsers-tamtam-and-csspool/feed/" rel="self" type="application/rss+xml" />
	<link>http://jystewart.net/process/2007/12/exploring-ruby-css-parsers-tamtam-and-csspool/</link>
	<description>notes from another web developer</description>
	<lastBuildDate>Sat, 24 Jul 2010 07:17:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Vince</title>
		<link>http://jystewart.net/process/2007/12/exploring-ruby-css-parsers-tamtam-and-csspool/comment-page-1/#comment-77823</link>
		<dc:creator>Vince</dc:creator>
		<pubDate>Wed, 09 Jan 2008 02:39:50 +0000</pubDate>
		<guid isPermaLink="false">http://jystewart.net/process/2007/12/exploring-ruby-css-parsers-tamtam-and-csspool/#comment-77823</guid>
		<description>Here are a couple of migrations if you want to parse your css into a database. There&#039;s probably a better OO way to get some of the info I&#039;m after (please share), but since I&#039;m comfortable with group by queries, this worked for me.

class CreateCss &lt; ActiveRecord::Migration
  def self.up
    create_table :selector do &#124;t&#124;
      t.column :name, :string
    end
    
    create_table :value do &#124;t&#124;
      t.column :selector_id, :integer
      t.column :property_id, :integer
      t.column :value, :string
    end

    create_table :property do &#124;t&#124;
      t.column :name, :string
    end
  end

  def self.down
    drop_table :property
    drop_table :value
    drop_table :selector
  end
end

require &#039;app/models/selector&#039;
require &#039;app/models/property&#039;
require &#039;app/models/value&#039;

require &#039;csspool&#039;

class ParseCss  prop.id, :selector_id =&gt; sel.id, :value =&gt; property[1].to_s)
      end
    end
  end
      
  def self.down
    Value.delete_all
    Property.delete_all
    Selector.delete_all
  end
end</description>
		<content:encoded><![CDATA[<p>Here are a couple of migrations if you want to parse your css into a database. There&#8217;s probably a better OO way to get some of the info I&#8217;m after (please share), but since I&#8217;m comfortable with group by queries, this worked for me.</p>
<p>class CreateCss &lt; ActiveRecord::Migration<br />
  def self.up<br />
    create_table :selector do |t|<br />
      t.column :name, :string<br />
    end</p>
<p>    create_table :value do |t|<br />
      t.column :selector_id, :integer<br />
      t.column :property_id, :integer<br />
      t.column :value, :string<br />
    end</p>
<p>    create_table :property do |t|<br />
      t.column :name, :string<br />
    end<br />
  end</p>
<p>  def self.down<br />
    drop_table :property<br />
    drop_table :value<br />
    drop_table :selector<br />
  end<br />
end</p>
<p>require &#8216;app/models/selector&#8217;<br />
require &#8216;app/models/property&#8217;<br />
require &#8216;app/models/value&#8217;</p>
<p>require &#8216;csspool&#8217;</p>
<p>class ParseCss  prop.id, :selector_id =&gt; sel.id, :value =&gt; property[1].to_s)<br />
      end<br />
    end<br />
  end</p>
<p>  def self.down<br />
    Value.delete_all<br />
    Property.delete_all<br />
    Selector.delete_all<br />
  end<br />
end</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vince</title>
		<link>http://jystewart.net/process/2007/12/exploring-ruby-css-parsers-tamtam-and-csspool/comment-page-1/#comment-77822</link>
		<dc:creator>Vince</dc:creator>
		<pubDate>Tue, 08 Jan 2008 09:41:48 +0000</pubDate>
		<guid isPermaLink="false">http://jystewart.net/process/2007/12/exploring-ruby-css-parsers-tamtam-and-csspool/#comment-77822</guid>
		<description>rule.properties is a Set of property Arrays for the selector.  Each array has a property name, and a value object, and the important property of the property (whatever that is).</description>
		<content:encoded><![CDATA[<p>rule.properties is a Set of property Arrays for the selector.  Each array has a property name, and a value object, and the important property of the property (whatever that is).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Kubb</title>
		<link>http://jystewart.net/process/2007/12/exploring-ruby-css-parsers-tamtam-and-csspool/comment-page-1/#comment-77771</link>
		<dc:creator>Dan Kubb</dc:creator>
		<pubDate>Wed, 05 Dec 2007 19:08:36 +0000</pubDate>
		<guid isPermaLink="false">http://jystewart.net/process/2007/12/exploring-ruby-css-parsers-tamtam-and-csspool/#comment-77771</guid>
		<description>James, you may also want to check out Premailer (http://code.dunae.ca/premailer.web/) which does exactly what you want I think.  Its written in ruby using Hpricot, and the source code is available off a link at the bottom of the page.</description>
		<content:encoded><![CDATA[<p>James, you may also want to check out Premailer (<a href="http://code.dunae.ca/premailer.web/" rel="nofollow">http://code.dunae.ca/premailer.web/</a>) which does exactly what you want I think.  Its written in ruby using Hpricot, and the source code is available off a link at the bottom of the page.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
