i'm trying to simulate the from a to b example (using ie) at
http://www.bayes.co.uk/xml/tutorial/atob/fromatob.xml
but when viewing this .xsl
<?xml version="1.0" encoding="utf-8" ?>
- <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:request="http://www.bayes.co.uk/request">
- <msxsl:script language="JavaScript" implements-prefix="request">
- <![CDATA[
function queryString(context){
var url = context.nextNode.url;
var nvpairs = url.substr(url.indexOf("?")+1);
nvpairs = nvpairs.replace(/\&/, "&");
var nvparray = new Array();
nvparray = nvpairs.split("&");
var tdom = new ActiveXObject("MSXML2.DOMDocument");
var od = tdom.createNode(1, 'myParam', '');
for (var i=0; i < nvparray.length; i++){
var nv = nvparray[i].split("=");
var mn = tdom.createNode(1, nv[0], '');
var tn =
tdom.createTextNode(unescape(nv[1].replace(/\+/g, " ")));
mn = od.appendChild(mn);
tn = mn.appendChild(tn);
}
return od.selectNodes("*");
}
]]>
</msxsl:script>
- <xsl:template match="/">
- <html>
<head />
- <body>
- <center>
<h1>Beers</h1>
- <xsl:for-each select="request:queryString(/)">
<
<xsl:value-of select="name()" />
>
<xsl:value-of select="." />
</
<xsl:value-of select="name()" />
>
<br />
</xsl:for-each>
</center>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
it gives this error:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then
click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Whitespace is not allowed at this location. Error processing resource
'file:///F:/broker/exampl2/beer5a.xsl'. Line 34, Position 4
<
any ideas?
tia,
dk
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list