hi i have my xml code below:

<?xml-stylesheet type="text/xsl" href="book.xsl" version="1.0"?>
<books xmlns:xsd = "http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation = "book.xsd">
	<book id="001">
		<title>Birth of the Mind</title>
		<publisher>Basic Books</publisher>
		<description>write your desc.</description>	


and here my xsl code:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
		<head><title align="center">Books published after 2000</title></head>
			<table align="center" border="1">
			<xsl:for-each select="books/book">
				<td><img src="book.gif"></img></td>
				<td><xsl:value-of select="isbn"/></td>
				<td><xsl:value-of select="title"/></td>
				<td><xsl:value-of select="author/firstname"/>,<xsl:value-of select="author/lastname"/></td>
				<td><xsl:value-of select="publisher"/></td>
				<td><xsl:value-of select="year"/></td>
				<td><xsl:value-of select="price"/></td>

But the problem is that i need to insert different pictures in different rows. The way i have done it, the same picture is appearing on all rows. I have no idea how to do this. Can someone help me?

You have hard-coded the image value to be book.gif. Change

<td><img src="book.gif"></img></td>


<td><img src="{picture}"></img></td>
commented: Its helpfull n thanks +0

ok thx

This is really helpfull thanks all.. i settle mine problem too :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.