cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jki...@csc.com
Subject Re: Printing dynamic values to value properties in HTML controls and tags.
Date Mon, 04 Jun 2001 17:46:52 GMT
try this , you'll need to modify of course

xsl fragment:

<xsl:when test="type[. = 'radio']">
             <xsl:for-each select="options/option">
               <xsl:element name="input">
                 <xsl:attribute name="name">n1</xsl:attribute>
                 <xsl:attribute name="type">radio</xsl:attribute>
                 <xsl:if test="@checked[.='true']">
                   <xsl:attribute name="checked">1</xsl:attribute>
                 </xsl:if>
                 <xsl:attribute name="value">
                   <xsl:value-of select="."/>
                 </xsl:attribute>
               </xsl:element>
               <xsl:value-of select="."/>
             </xsl:for-each>
           </xsl:when>



xml fragment

<item name="cdm_LiveStatus">
                 <label>Live Status</label>
                 <type>radio</type>
                 <validation active="yes" optional="yes" type=""/>
                 <options>
                   <option name="alive">Alive</option>
                   <option name="dead">Dead</option>
                 </options>
               </item>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message