![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: values from ddl into xslt values from ddl into xsltTo: NULL Date: 7/11/2007 9:42:00 AM
Hi all
I have this huge xml file which keeps data from 3 different providers
(colors) and I use xslt to display the numbers on a webpage.
The xml has numbers both for each provider and total numbers from all
providers, like 3 blue cars , 4 red cars, total 7 cars
For now, I just display numbers from all providers at the same time on
the page, first for each color using <xsl:for-each color> and then
display the total number for all colors and everyting work smooth..
But now, I want to be able to add a dropdownlist with available colors
to the page so the user can choose between seeing numbers for just one
color and also there would be an option in the ddl for the user to
choose to see total numbers for all colors.
the xml looks like this
<total value="11">
<color name="red">
<number>4</number>
.
.
.
</color>
<color name="blue">
<number>7</number>
.
.
</color>
</total>
Since I am no good with xslt, is possible for me to get some value
from the ddl like colorname and just get the data for that color from
the xml in the xslt file? In more dummy way of telling this, if the
user selects to see numbers for the red cars in the ddl then i want in
stead of using foreach color in the xslt, I want to be able to say..
if( ddlColors.selectedvalue == <color name="xx">) {
<b>
<xsl:value-of select="total/color/@number"/>
</b>
}
if anyone understands what i am trying to do/say here .. is this even
possible or do i have to split up the xml file, so there would be one
for by colors and one for total.. ??
thanx
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
