title: Conditionally add HTML element attribute in Facelets
body: <p>Using Facelets and writing some XHTML, I cannot figure out how to create an element and then add attributes later, like in xslt if you wanted to conditionally add an attribute:</p>
  
  <pre><code>&lt;xsl:element name="div"&gt;
      &lt;xsl:attribute name="style"&gt;color:blue;&lt;/xsl:attribute&gt;
  &lt;/xsl:element&gt;
  </code></pre>
  
  <p>Google gave some examples with JSP taglib similar to</p>
  
  <pre><code>&lt;jsp:element name="div"&gt;
       &lt;jsp:attribute name="."&gt;...&lt;/jsp:attribute&gt;
  &lt;/jsp:element&gt;
  </code></pre>
  
  <p>That library is not provided as standard in Facelets and searching the docs of the ones that are included doesn't show anything obvious.</p>