How to use a Diazo rule to transform the Deco grid used with Sunburst Theme in Plone 4 into a Bootstrap 2 grid.

<!-- Transform Deco (Sunburst Theme) grid into Bootstrap 2 grid. -->
<replace content="//div[contains(@class,'cell')]">
  <div>
    <xsl:copy-of select="attribute::*[not(name()='class')]" />
    <xsl:attribute name="class">
      <xsl:choose>
        <xsl:when test='@class[contains(.,"width-1:4")]'>span3</xsl:when>
        <xsl:when test='@class[contains(.,"width-1:3")]'>span4</xsl:when>
        <xsl:when test='@class[contains(.,"width-1:2")]'>span6</xsl:when>
        <xsl:when test='@class[contains(.,"width-2:3")]'>span8</xsl:when>
        <xsl:when test='@class[contains(.,"width-3:4")]'>span9</xsl:when>
        <xsl:when test='@class[contains(.,"width-full")]'>span12</xsl:when>

        <xsl:when test='@class[contains(.,"width-16")]'>span12</xsl:when>
        <xsl:when test='@class[contains(.,"width-15")]'>span11</xsl:when>
        <xsl:when test='@class[contains(.,"width-14")]'>span11</xsl:when>
        <xsl:when test='@class[contains(.,"width-13")]'>span10</xsl:when>
        <xsl:when test='@class[contains(.,"width-12")]'>span9</xsl:when>
        <xsl:when test='@class[contains(.,"width-11")]'>span8</xsl:when>
        <xsl:when test='@class[contains(.,"width-10")]'>span8</xsl:when>
        <xsl:when test='@class[contains(.,"width-9")]'>span7</xsl:when>
        <xsl:when test='@class[contains(.,"width-8")]'>span6</xsl:when>
        <xsl:when test='@class[contains(.,"width-7")]'>span5</xsl:when>
        <xsl:when test='@class[contains(.,"width-6")]'>span4</xsl:when>
        <xsl:when test='@class[contains(.,"width-5")]'>span4</xsl:when>
        <xsl:when test='@class[contains(.,"width-4")]'>span3</xsl:when>
        <xsl:when test='@class[contains(.,"width-3")]'>span2</xsl:when>
        <xsl:when test='@class[contains(.,"width-2")]'>span1</xsl:when>
        <xsl:when test='@class[contains(.,"width-1")]'>span1</xsl:when>
      </xsl:choose>
    </xsl:attribute>
    <xsl:apply-templates />
  </div>
</replace>