This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Re: Re: WML input problem
- From: "ashu t" <aashut at rediffmail dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: 8 Jul 2002 14:31:58 -0000
- Subject: Re: Re: [xsl] Re: WML input problem
- Reply-to: xsl-list at lists dot mulberrytech dot com
thanks a lot
i tried that code but some how it is not working the whole
template match code is
<xsl:template match="//input">
<xsl:variable name="type" select="@type"/>
<xsl:if test="$type='text' or $type='password' or
$type='radio' or $type='checkbox'">
<xsl:choose>
<xsl:when test="$type='text'">
<input name="{@name}" type="{@type}">
<xsl:apply-templates/>
</input>
</xsl:when>
<xsl:when test="$type='password'">
<input name="{@name}" type="{@type}">
<xsl:apply-templates/>
</input>
</xsl:when>
<xsl:when test="$type='radio' and
generate-id()=generate-id(key('radios',@name))">
<select name="{@name}">
<xsl:for-each select="key('radios', @name)"/>
<option value="{@value}">
<xsl:apply-templates/>
</option>
</xsl:for-each>
</select>
</xsl:when>
</xsl:choose>
</xsl:if>
</xsl:template>
and i have declared <xsl:key>at top at this place just after
<xsl:stylesheet>
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:key name="radios" match="input[@type='radio']"
use="@name"/>
<xsl:output omit-xml-declaration="yes"/>
but it is not working but if i remove the when condition for input
type=radio it is working fine for rest of two input types.what can
be the reason and one more thing i did not get the need for<<and
generate-id()=generate-id(key('radios',@name))>>
ashu
_________________________________________________________
There is always a better job for you at Monsterindia.com.
Go now http://monsterindia.rediff.com/jobs
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list