Q:

URL in xslt-generated table redirecting to that page

I am transforming data from an XML file via XSLT that will display as a table on an HTML page. (The XML and XSLT files are called using javascript code that is identical to what can be found on the w3schools XSLT on the Client page.) One of my XML fields contains a URL. My transform creates a href attribute for that field, but instead of posting the URL from the XML file, it replaces it with the URL for the HTML page that the table will live in.
My XML looks like this:
<database>
<Table>
<Title>Title</Title>
<URL value="www.link.com">Watch this video</URL>
</table>        

My XSLT looks like this:
<table>
<tr>
<th>Title</th>
<th>URL</th>
</tr>
<xsl:for-each select="database/table">
<tr>
<td><xsl:value-of select="Title"/></td>
<td>
<a>
<xsl:attribute name="href">
<xsl:value-of select="URL/@VALUE"/>
</xsl:attribute>
<xsl:value-of select="URL"/>
</a>
</td>
</tr>
</xsl:for-each>
</table>

But on the HTML page, the "Watch this video" link is not "www.link.com" but "www.HTMLpage.com." The same thing happens if I add the XSL transform to the XML document and open it in a browser - the links still go to the address of that page, not externally where I want them.

A:

XPath is case-sensitive.
Replace:
<xsl:value-of select="URL/@VALUE"/>

with:
<xsl:value-of select="URL/@value"/>

Now the result of the corrected transformation, when applied on the provided XML document (also needs similar correction and a closing tag), produces the wanted result:
<table>
   <tr>
      <th>Title</th>
      <th>URL</th>
   </tr>
   <tr>
      <td>Title</td>
      <td>
         <a href="www.link.com">Watch this video</a>
      </td>
   </tr>
</table>

