[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: Re: WML input problem
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
|
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
|