Connecting Tech Pros Worldwide Forums | Help | Site Map

getting data from XML rendering with XSL

Newbie
 
Join Date: Jan 2006
Posts: 1
#1: Jan 5 '06
I'm newbie to xml
I have an xml grammer file contain image files, i have to display the contents with an

xsl file.
The issue is when i mouseover the images i need to display the corresponding images from

that xml file which i'm not able to get. I'm giving piece of code of xml and xsl files.Could

u please tell me how can I get that work done

my xml file is like this--------------------------------

Expand|Select|Wrap|Line Numbers
  1.  <solutions name ="infrastructure solutions" 
  2.  
  3. icon="icons_C2/logo_infrastructure.gif" >
  4.  
  5. <Product Name="Automation Documentation Home Page" Icon="icons_C2/home/homelogoCAA.gif"/>
  6.  
  7. <Product Name=" Infrastructure User Guide" Icon="icons_C2/home/homelogobas.gif"/>
  8.  
  9. <Product Name="Product Structure" Icon="icons_C2/home/homelogopst.gif"/> 
  10.  
  11. <Product Name="Real Time Rendering" Icon="icons_C2/home/homelogort1.gif"/>
  12. </solutions>
  13.  
  14. <solutions name =" ..............">
  15. </solutions>
  16.  
XSL code for this is

Expand|Select|Wrap|Line Numbers
  1.  <xsl:for-each select="Home/solutions"> 
  2. <tr>
  3. <td><img src="{@icon}" name="{@name}" onmouseover='<xsl:for-each select="Product"/>
  4. <td><img src="{@Icon}"/></td>
  5. </xsl:for-each>;'/></td>
  6. </tr>
  7. </xsl:for-each> 
  8.  


this way or write a javascript function which will do the similar functionality of xsl

transolation(xsl transolation in javascript method is not possible)

Expand|Select|Wrap|Line Numbers
  1.  <xsl:for-each select="Home/solutions"> 
  2. <tr>
  3. <td><img src="{@icon}" name="{@name}" onmouseover='iconVisible()'/> </td>
  4. </tr>
  5.  
  6.  
  7. </xsl:for-each>    
  8.  
  9. <script language="Javascript"
  10. function iconVisible()
  11. {
  12.  
  13. <tr>
  14. <xsl:for-each select="Home/solutions/Product">
  15. <td><img src="{@Icon}"/></td>
  16. </xsl:for-each>
  17. </tr>
  18.  
  19. </script>
  20. -->
  21. }
  22.  
I need to display all the solution icons on the left handside.
When I mouseover those icons i need to display corresponding product icons.
Similarly on mouseout icons should be hidden.
Thanks in advance.

KUB365's Avatar
Administrator
 
Join Date: Jul 2005
Location: Portland, OR
Posts: 975
#2: Jan 5 '06

re: getting data from XML rendering with XSL


Moved thread from "Lounge" to "Programming Help". Try to post new topics in relevant forums.
Reply