<xmp>
Server-Side
=========
JScript:
XML.transformNodeToObject(XSLT,Response);
VBScript:
XML.transformNodeToObject XSLT, Response
Client-Side
========
<script language="JScript">
//Requires MDAC 2.5 Minimum
//May have Internet Restrictions
//Better suited for Intranet and Extranets
var Stream = new ActiveXObject("ADODB.Stream")
var XML = new ActiveXObject("Msxml2.DOMDocument.3.0");
var XSLT = new ActiveXObject("Msxml2.DOMDocument.3.0");
XML.async = XSLT.async = false;
XML.load("copy.xml");
XSLT.load("copy.xsl");
with (Stream) {
CharSet = "windows-1252";
Open();
XML.transformNodeToObject(XSLT, Stream);
Position = 0;
var szText = Stream.ReadText();
Close;
Quote:}
var myWin = window.open("about:blank","myWin");
myWin.document.open();
myWin.document.write(szText);
myWin.document.close();
delete myWin; myWin = null;
delete XML; XML = null;
delete XSLT; XSLT = null;
delete Stream; Stream = null;
CollectGarbage();
</script>
</xmp>
> Gidday,
> I have an XML document that I wish to transform to HTML throught DOM using
> an XSL document. I can produce the HTML no problem (style, layout, etc).
> However, the META tag that is produced in the HTML is,
> <META http-equiv="Content-Type" content="text/html; charset=UTF-16"> but I
> would like it to be
> <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> so
> that European characters are handled correctly.
> My XSL document begins as follows,
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <xsl:output method="html" encoding="ISO-8859-1"/>
> AND my XML,
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <?xml:stylesheet type="text/xsl"?>
> I would appreciate any help with this.
> Cheers,
> Dan.