The xsl:output element is supported by the .NET Framework. The xsl:output element is ignored when the output of the XslTransform.Transform method is an XmlReader or XmlWriter. These types are not byte-stream-based, using .NET-native UTF-16 encoded strings to store data.
The following sketch uses the MemoryStream type to represent data as bytes instead of UTF-16 strings:
XslTransform xslt = new XslTransform();
XPathDocument xml = new XPathDocument("data.xml");
MemoryStream ms = new MemoryStream();
xslt.Load("template.xslt");
xslt.Transform(xml,null,ms,null);
xhtml = Encoding.UTF8.GetString(ms.GetBuffer());
For details see "Outputs from an XslTransform" at:
http://msdn.microsoft.com/library/
en-us/cpguide/html/cpconInputsOutputsToXslTransform.asp