[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: input type radio checked

Subject: RE: input type radio checked
From: "Steve Gold" <Steve@xxxxxxxxxxxxx>
Date: Tue, 4 Mar 2003 20:38:53 -0500
radio checked
Two things are probably at play here:
1. When XML is looking at your HTML it needs for attributes to all be in
an acceptable form 
As far as XML is concerned.  In other words, something like <br> is ok
in HTML,
but in XML you need to write <br />  Same thing with the attribute
called: checked 
Write it like this:
checked="True"

2. The other issue relates to setting the attirbute inside the <input>
and </input>  Although logically it would seem to work, it can be easily
solved using "choose" instead of "if" like this:
<xsl:for-each select="registro">
  <xsl:choose>
    <xsl:when test="position() = 1">
      <input checked="True" type="radio" name="votacionvalor"
value="{valorrespuesta}" />
    </xsl:when>
    <xsl:otherwise>
      <input type="radio" name="votacionvalor" value="{valorrespuesta}"
/>        
    </xsl:otherwise>
  </xsl:choose>
  <xsl:value-of select="respuesta"/><br />
</xsl:for-each>




-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
Jarno.Elovirta@xxxxxxxxx
Sent: Tuesday, March 04, 2003 2:35 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  input type radio checked


Hi

> <xsl:for-each select="registro">
> <input type="radio" name="votacionvalor" value="{valorrespuesta}">

    <xsl:if test="position() = 1">
      <xsl:attribute name="checked">checked</xsl:attribute>
    </xsl:if>
   </input>

> <xsl:value-of select="respuesta"/><br />
> </xsl:for-each>
> 
> in this method i load 25 input radio type.
> how can i always the fist radio put in checked mode?
> (<input type="radio" name="votacionvalor" value="{valorrespuesta}" 
> checked="checked"  />) only in the fist radio.
> is posible?
> how?
> thanks

Cheers,

Jarno - Neurotic Fish: Wake Me Up

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.