B
bissatch
Hi,
I have a an XML file:
<xml...
<store>
<book>
<title>Darkness at Noon</title>
<price>12.99</price>
<url>http://www.amazon.com/...</url>
</book>
.
.
.
</store>
I am trying to outout it using the following segment in my XSL file:
<xsl:for-each select="store/book">
<p><strong><value-of select="title" /></strong></p>
<p>£<value-of select="price" /></p>
<p><a href="<value-of select="url" />">Buy book</a></p>
</xsl:for-each>
Now I was certain that this would fail as it is not valid XML but I
have no idea how I would add a value to a HTML attribute (within
double quotes). Obviously Im going about this the wrong way but could
someone please tell me the correct method for this. Thanks
Burnsy
I have a an XML file:
<xml...
<store>
<book>
<title>Darkness at Noon</title>
<price>12.99</price>
<url>http://www.amazon.com/...</url>
</book>
.
.
.
</store>
I am trying to outout it using the following segment in my XSL file:
<xsl:for-each select="store/book">
<p><strong><value-of select="title" /></strong></p>
<p>£<value-of select="price" /></p>
<p><a href="<value-of select="url" />">Buy book</a></p>
</xsl:for-each>
Now I was certain that this would fail as it is not valid XML but I
have no idea how I would add a value to a HTML attribute (within
double quotes). Obviously Im going about this the wrong way but could
someone please tell me the correct method for this. Thanks
Burnsy