471,122 Members | 848 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,122 software developers and data experts.

getting data from XML rendering with XSL

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.
Jan 5 '06 #1
1 2349
Niheel
2,452 Expert Mod 2GB
Moved thread from "Lounge" to "Programming Help". Try to post new topics in relevant forums.
Jan 5 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by David Opstad | last post: by
5 posts views Thread by Brandons of mass destruction | last post: by
9 posts views Thread by Wayfarer | last post: by
3 posts views Thread by Harry Whitehouse | last post: by
10 posts views Thread by crazycooter | last post: by
2 posts views Thread by Simon | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.