Originally posted by: Ameesh
your XSLT will have to have a template for a specific tag ion your xml to transform it to an anchor, XML is purely data so there is no concept of a link in plain xml.
That is what I have done, but I haven't figure out how to create hyper link similar to html (a href) tag.
<!--
***** Below is the distro_list.xml file *****
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="distro_list.xsl"?>
<distro_list>
<distro>
<name>2-Disk Xwindow</name>
<developer>Mungkie Associates Inc.</developer>
<language>En</language>
<cpu>x86</cpu>
<url>
http://www.thepub.nildram.co.uk/mirrors/2diskxwin/2diskXwin.htm</url>
</distro>
<distro>
<name>Alphalinux</name>
<language>En, It</language>
<cpu>x86</cpu>
<url>
http://alfalinux.sourceforge.net/alfaeng.php3</url>
</distro>
</distro_list>
***** Below is the style file distro_list.xsl *****
<?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="/">
<html>
<body>
<center><h2>Linux Distro List</h2></center>
<table border="1" cellpadding="3" cellspacing="1" bgcolor="#eeeeee">
<tr align="center">
<th>#</th>
<th>Distribution</th>
<th>Developer</th>
<th>Flatform</th>
<th>Language</th>
<th>Link</th>
</tr>
<xsl:for-each select="distro_list/distro">
<xsl:sort select="name"/>
<tr bgcolor="#ffffff">
<td><xsl:number/>.</td>
<td><xsl:value-of select="name"/></td>
<td><xsl:value-of select="developer"/></td>
<td align="center"><xsl:value-of select="language"/></td>
<td align="center"><xsl:value-of select="cpu"/></td>
<td><xsl:value-of select="url"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
//-->