saradhi74
November 17th, 2003, 12:40 AM
Hi I have one problem please help me... I pasted the code below...
<A href="#{@id}-DESCRIPTION" name="{@id}-COST">
<xsl:value-of select="name"/>
</A>
I used the above code in below xsl file....
when I view taht file in browser I could able to see hyper links on name but value of href is same as what i giave "="{@id}"
infact the @id should display the value....
I am using IE 5.5
please help me in finding out the problem..
Thanks in advance
******************XML File :
<?xml version="1.0"?>
<!--<!DOCTYPE juicers SYSTEM "juicers.dtd">-->
<?xml-stylesheet type="text/xsl" href="Juicers1.xsl"?>
<juicers>
<juicer id="mighty-oj" electric="false" type="press">
<name>OJ Home Juicer</name>
<image>images\mighty_oj.gif</image>
<description>There's just no substitute for a recyclable waste as do frozen juices.</description>
<warranty>lifetime warranty</warranty>
<weight></weight>
<cost currency="USD">41.95</cost>
<retailer>http://www.thewhitewhale.com/oj.htm</retailer>
</juicer>
</juicers>
****************XSL File :
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" xmlns="http://www.w3.org/TR/REC-html40" result-ns="">
<xsl:template match = "/">
<html>
<body>
<h2> Juicers Example </h2>
<table border="1">
<tr>
<td>Jucers</td>
<td>Cost</td>
</tr>
<xsl:for-each select="/juicers/juicer">
<tr>
<td>
<A href="#{@id}-DESCRIPTION" name="{@id}-COST">
<xsl:value-of select="name"/>
</A>
</td>
<td>
$ <xsl:value-of select="cost[@currency='USD']"/>
</td>
</tr>
</xsl:for-each>
</table>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<table border="1" width="100%">
<tr>
<td>Jucers</td>
<td>Description</td>
</tr>
<xsl:for-each select="/juicers/juicer">
<tr>
<td>
<a href="#{@id}-COST" name="{@id}-DESCRIPTION">
<xsl:value-of select="name"/>
</a>
</td>
<td>
<xsl:value-of select="description"/>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
<A href="#{@id}-DESCRIPTION" name="{@id}-COST">
<xsl:value-of select="name"/>
</A>
I used the above code in below xsl file....
when I view taht file in browser I could able to see hyper links on name but value of href is same as what i giave "="{@id}"
infact the @id should display the value....
I am using IE 5.5
please help me in finding out the problem..
Thanks in advance
******************XML File :
<?xml version="1.0"?>
<!--<!DOCTYPE juicers SYSTEM "juicers.dtd">-->
<?xml-stylesheet type="text/xsl" href="Juicers1.xsl"?>
<juicers>
<juicer id="mighty-oj" electric="false" type="press">
<name>OJ Home Juicer</name>
<image>images\mighty_oj.gif</image>
<description>There's just no substitute for a recyclable waste as do frozen juices.</description>
<warranty>lifetime warranty</warranty>
<weight></weight>
<cost currency="USD">41.95</cost>
<retailer>http://www.thewhitewhale.com/oj.htm</retailer>
</juicer>
</juicers>
****************XSL File :
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" xmlns="http://www.w3.org/TR/REC-html40" result-ns="">
<xsl:template match = "/">
<html>
<body>
<h2> Juicers Example </h2>
<table border="1">
<tr>
<td>Jucers</td>
<td>Cost</td>
</tr>
<xsl:for-each select="/juicers/juicer">
<tr>
<td>
<A href="#{@id}-DESCRIPTION" name="{@id}-COST">
<xsl:value-of select="name"/>
</A>
</td>
<td>
$ <xsl:value-of select="cost[@currency='USD']"/>
</td>
</tr>
</xsl:for-each>
</table>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<table border="1" width="100%">
<tr>
<td>Jucers</td>
<td>Description</td>
</tr>
<xsl:for-each select="/juicers/juicer">
<tr>
<td>
<a href="#{@id}-COST" name="{@id}-DESCRIPTION">
<xsl:value-of select="name"/>
</a>
</td>
<td>
<xsl:value-of select="description"/>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>