|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: input type radio checked
Hi,
> 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"
See HTML 4.01 or XHTML 1.0 DTDs - the only allowed value for checked attribute is "checked".
> 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>
I have to disagree with you here, using xsl:attribute should be favored in this case - unless I'm missing something here?
Cheers,
Jarno - God Module: Interference
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








