Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xml and xsl view detail description

Status
Not open for further replies.
Oct 21, 2003
3
US
Hello,

Could someone kindly help me?

I have the xsl and xml file below. My question is after I've selected a CD title, how can I display that CD in detail description with country, price, year, etc?

Thanks,
Tracy

cd.xsl file

<?xml version=&quot;1.0&quot;?>
<xsl:stylesheet xmlns:xsl=&quot; <xsl:template match=&quot;/&quot;>
<HTML><BODY>
<table>
<tr>
<td>CD Title</td>
<td>
<select>
<xsl:for-each select=&quot;/CATALOG/CD&quot;>
<option>
<xsl:attribute name=&quot;value&quot;><xsl:value-of select=&quot;TITLE/text()&quot;/>
</xsl:attribute>
</option>
<xsl:value-of select=&quot;TITLE/text()&quot;/>
</xsl:for-each>
</select>
</td>
</tr>
</table>
</BODY></HTML>
</xsl:template>
</xsl:stylesheet>


cd.xml file

<?xml version=&quot;1.0&quot; encoding=&quot;ISO8859-1&quot; ?>
<?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;cd.xsl&quot;?>
<CATALOG>
<CD>
<TITLE>Hotel Paper</TITLE>
<ARTIST>Michelle Branch</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Maverick</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>2003</YEAR>
</CD>
<CD>
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
</CD>
</CATALOG>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top