Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - hyperlink in XSL style sheet >Thread Next - Re: hyperlink in XSL style sheet Re: hyperlink in XSL style sheetTo: NULL Date: 3/7/2006 8:06:00 AM KP wrote:
> Hi all
> i am totally new to xsl and xml
> i made an xml page which displays items like:
> <Row>0</Row>
> <Name>NBK</Name>
> <Price>1840</Price>
>
> ...etc
>
> i made an xsl style sheet to display these datas in a table as
> <xsl:for-each select="//NewDataSet/QuotesTable">
> <tr>
> <td align="center"><xsl:value-of select="Row" /></td>
> <td align="center"><xsl:value-of select="Name" /></td>
> <td align="center"><xsl:value-of select="Price" /></td>
> </tr>
> </xsl:for-each>
>
> but i need the first columns as hyperlink to a page
> "showdetails.aspx?Row= < the value in Row field>
> some thing similar to
> <xsl:for-each select="//NewDataSet/QuotesTable">
> <tr>
> <td align="center">
> <a href="ShowDetails.aspx?Row=<xsl:value-of select="Row" />">
> <xsl:value-of select="Row" />
> </a></td>
> <td align="center"><xsl:value-of select="Name" /></td>
> <td align="center"><xsl:value-of select="Price" /></td>
> </tr>
> </xsl:for-each>
>
>
>
> How its is possible?
There's probably a for concise way to do this, but you can
change this:
<td align="center"><xsl:value-of select="Row" /></td>
To this:
<td align="center">
<a>
<xsl:attribute name="href">
<xsl:text>ShowDetails.aspx?Row=</xsl:text>
<xsl:value-of select="Row" />
</xsl:attribute>
</a>
<xsl:value-of select="Row" />
</td>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
