| Subject: Re: [xsl] Building a HTML checkbox with php:function From: "Joe Fawcett" <joefawcett@xxxxxxxxxxx> Date: Sun, 10 Sep 2006 13:29:29 +0100 | 
<input type="checkbox" checked> is HTML/SGML shorthand for <input type="checkbox" checked="checked">
I4m trying to figure out how is possible to build a HTML checkbox in a transformation. The main problem, I think, is the HTML syntax for this widget. A checkbox input need a attribute 'checked' without a value. So the input tag
I4m using parameters to test if a widget need review. To a textfield it4s easy cause I just return the value for the attribute value.
With a checbox I need to put and attribute named checked and I realy don4t catch how to do it with stylesheets. Maybe build all widget as text isn4t better?
<xsl:template match="x:check">
  <input type="checkbox">
     <xsl:attribute name="name">
        <xsl:value-of select="@name"/>
     </xsl:attribute>
     <xsl:if test="$review='true'">
        <xsl:attribute name="checked">
           <xsl:value-of
select="php:function('eval_xsl_review_var',@name,'check')" />
        </xsl:attribute>
     </xsl:if>
  </input>
</xsl:template>-- Quando um homem nco acredita em Deus, nco i que nco acredite mais em nada - i que ele acredita em qualquer coisa. (G. K. Chesterton)
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| [xsl] Building a HTML checkbox with, Ruben Trancoso | Thread | Re: [xsl] Building a HTML checkbox , Ruben Trancoso | 
| [xsl] Building a HTML checkbox with, Ruben Trancoso | Date | Re: [xsl] Building a HTML checkbox , Ruben Trancoso | 
| Month |