[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
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:
--
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Re: [xsl] Re: WML input problem
Subject: Re: [xsl] Re: WML input problem From: Joerg Heinicke <joerg.heinicke@xxxxxx> Date: Mon, 08 Jul 2002 16:30:50 +0200 |
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@xxxxxxxxx www.virbus.de
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Re: WML input problem, ashu t | Thread | Re: Re: [xsl] Re: WML input problem, ashu t |
[xsl] grouping after filtering plus, 林 子芯 | Date | Re: Re: [xsl] Re: WML input problem, ashu t |
Month |