Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


values from ddl into xslt

From: kollatjorva@-----.---
To: 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



transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent