We're using MSXML to transform the XML document we have to an XHTML
file using an XSLT. Now the problem is that the dotnet implementation
we made does something subtly different from the commandline call to
MSXML. The problem is that the dotnet variant leaves out a piece of
info on the charset, leading to the browser going to a default encoding
instead of the wanted UTF-8.
MSXML2.DOMDocum ent40Class stylesheet = new
MSXML2.DOMDocum ent40Class();
stylesheet.asyn c = false;
source.validate OnParse = false;
stylesheet.load (xsls[i]);
string s = source.transfor mNode(styleshee t);
System.IO.TextW riter file = System.IO.File. CreateText("pat h.html");
file.Write(s);
Note that the xslt has a line:
<xsl:output method="html" indent="yes" encoding="UTF-8" />
This code creates a meta tag different from the commandline version:
<META http-equiv="Content-Type" content="text/html">
Whereas the commandline version of MSXML nicely outputs.
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
Anyone have a clue how to do this? Do I need a
CreateProcessin gInstruction for the stylesheet?