This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Re: WML input problem
- From: Joerg Heinicke <joerg dot heinicke at gmx dot de>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 08 Jul 2002 16:30:50 +0200
- Subject: Re: [xsl] Re: WML input problem
- References: <20020708084518.14616.qmail@webmail26.rediffmail.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
So it is a grouping problem:
<xsl:key name="radios" match="input[@type='radio']" use="@name"/>
in your template matching on input (you can remove the slashes):
<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>
Regards,
Joerg
ashu t wrote:
i did not get what code should i add.
what i want to do is that if template match="//input"
and if input type is radio then i am creating a node <select with name
={@name}> then i want to run for -each loop and for each input type
radio create a <option value={@value)>text which is there in html file
</option>
</select>
like if html is
<P>Choose a Category of Room:
<UL>
<INPUT TYPE="radio" NAME="category" VALUE="liv" CHECKED> Living <BR>
<INPUT TYPE="radio" NAME="category" VALUE="din"> Dining <BR>
<INPUT TYPE="radio" NAME="category" VALUE="bed"> Bedroom
</UL>
i want to create
<select name=category>
<option value="liv">Living</option>
<option value="din">Dining</option>
<option value="bed">Bedroom</option>
</select>
may be this can give a clear picture
ashu
--
System Development
VIRBUS AG
Fon +49(0)341-979-7419
Fax +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list