This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Unable to show data using XSL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Unable to show data using XSL" Watch "Unable to show data using XSL" New topic
Author

Unable to show data using XSL

Hemanth Pallavajula
Ranch Hand

Joined: Oct 07, 2004
Posts: 38
hi Friends,

I am new to XSL, and in fact, the doubt I am asking here is related to my first program.

The XSL file(sample.xsl) is:


And my XML file is :-


I am able to get the heading in the table, but not able to see data.

Please help me in solving this issue.
[ March 16, 2005: Message edited by: Hemanth Pallavajula ]

Cheers,<br />Hemanth...<br />(When opportunity doesn't knock, build a door.)
Hasan Pasha
Greenhorn

Joined: Feb 23, 2005
Posts: 25
You need to check how to use xsl:for-each element.
Check out the tutorial at W3C Schools.
Hemanth Pallavajula
Ranch Hand

Joined: Oct 07, 2004
Posts: 38
hi,

Even after put this line, I am still getting the same problem.

<xsl:for-each select="catalog/cd">

What needs to be done..??
JayaSiji Gopal
Ranch Hand

Joined: Sep 27, 2004
Posts: 303
try this:

<xsl:for-each select="//cd">
<xsl:value-of select="title"/>
<xsl:value-of select="some other tag"/>
</xsl:for-each>


SCJP 1.4, SCWCD 1.4<br /> <br />Thanks in advance!<br />Jayashree.
Hemanth Pallavajula
Ranch Hand

Joined: Oct 07, 2004
Posts: 38
hi Jayashree,

I was unable to get output even after trying your approach. I am unable to know what to do. Please help me.
 
Don't get me started about those stupid light bulbs.
 
subject: Unable to show data using XSL
 
Similar Threads
XSLT Problem
Help Required in using If loop in XSL
Hyper links Using XSL?
Sample XML programs
Dynamic XML to HTML