If you go to
http://www.guitarmidi.co.uk/gui/browse.asp?id=h and view
source, the following line is in the <head> <META http-equiv="Content-Type"
content="text/html; charset=UTF-16">. Is this why i'm having problems? I
take data from the field on index.html and pass them to search.asp, this
page opens search.xsl
******************************************************************
index.html
========
<html>
<head>
<title>GuitarMidi</title>
<link href="mystyle.css" rel="stylesheet" type="text/css">
</head>
<body>
<table class="one">
<tr>
<td>
<p class = "one">search for artist or song</p>
<form method="post" action="search.asp">
<table class="two">
<tr>
<td><input type="text" name="textQuery" size="50"></td>
</tr>
</table>
<p><input type="submit" value="Search"/></p>
</form>
<p><a href="view.asp">view all</a></p>
</td>
</tr>
</table>
<p><a
href="javascript:window.external.AddFavorite('
http://www.guitarmidi.co.uk','GuitarMidi')">Add
to favourites</a>
| <a href="
http://www.vanbasco.com/karaokeplayer/"
target="_blank">vanBasco's Karaoke Player</a></p>
<p>
<a href="
http://validator.w3.org/check/referer" target="_blank">
<img src="images/valid_xhtml.png"
alt="Valid XHTML 1.0!" width="80" height="15"/></a>
<a href="
http://jigsaw.w3.org/css-validator/check/referer" target="_blank">
<img src="images/valid_css.png"
alt="Valid CSS!" width="80" height="15"/></a>
</p>
</body>
</html>
***************************************************************
search.asp
========
<%@ Language="VBScript" %>
<%
dim objDom, fileExists, objFieldValue, objPI
st1 = Request.Form("textQuery")
st2 = Request.QueryString("startPos")
a=Split(lcase(st1))
set xmlDocument = CreateObject("MSXML2.FreeThreadedDOMDocument")
xmlDocument.async="false"
xmlDocument.load(Server.MapPath("db/data.xml"))
set xslDocument = CreateObject("MSXML2.FreeThreadedDOMDocument")
xslDocument.async="false"
xslDocument.load(Server.MapPath("search.xsl"))
Set XSLTemplate = Server.CreateObject("MSXML2.XSLTemplate")
Set XSLTemplate.stylesheet = xslDocument
Set proc = XSLTemplate.createProcessor()
proc.input = xmlDocument
for n = 0 to ubound(a)
proc.addParameter "text" & n, a(n)
next
proc.addParameter "full", st1
proc.Transform
Response.Write proc.output
%>
*************************************************************************
search.xsl
=======
<?xml version="1.0"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<xsl
utput method="html"/>
<xsl
aram name="text0" />
<xsl
aram name="text1" />
<xsl
aram name="text2" />
<xsl
aram name="text3" />
<xsl
aram name="text4" />
<xsl:template match="/">
<html>
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css" />
<title>Results</title>
</head>
<body>
<table class="three" align="center">
<col width="40%"/>
<col width="40%"/>
<col width="10%"/>
<col width="10%"/>
<tr>
<th class="head1">Artist</th>
<th class="head1">Song</th>
<th class="head">Chord</th>
<th class="head">Midi</th>
</tr>
<xsl:for-each select="(cat/links[(contains(artist, $text0) or contains(song,
$text0)) and
(contains(artist, $text1) or contains(song, $text1)) and
(contains(artist, $text2) or contains(song, $text2)) and
(contains(artist, $text3) or contains(song, $text3)) and
(contains(artist, $text4) or contains(song, $text4))])[position() <=
20]">
<xsl:sort select="artist"/>
<xsl:sort select="song"/>
<tr>
<td class="one"><xsl:apply-templates select="./artist"/></td>
<td class="one"><xsl:apply-templates select="./song"/></td>
<xsl:variable name="path1"><xsl:apply-templates
select="./path"/></xsl:variable>
<td><a href="media/{$path1}.txt" target="_blank">view</a></td>
<td><a href="media/{$path1}.mid">play</a></td>
</tr>
</xsl:for-each>
</table>
<a href="index.html">Click here to return to search page</a>
</body>
</html>
</xsl:template>
</xsl:stylesheet>