XSLT C# DocType Missing

A

andy

Hi all,

I have the following lines in my XSLT file:

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:blush:utput
method="html"
encoding="UTF-8"
omit-xml-declaration="yes"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
indent="yes" />


and my C# looks like:
private void generatePage(XmlDocument xDoc, string xsltPath,
XsltArgumentList xslArg)
{
XslTransform xst = new XslTransform();
string absPath = xsltPath;
xst.Load(absPath);
XmlTextWriter writer = new XmlTextWriter(Response.Output);
writer.Formatting = Formatting.Indented;
writer.Indentation = 4;
xst.Transform(xDoc, xslArg, writer, new XmlUrlResolver());
}

It all works okay aside from it is missing the DocType declaration,
which is clearly not ideal.

Have you any ideas why this is the case? What is necessary to get the
DocType output correctly?

Additionally, are you aware of any performance tweaks for the XSLT
procedures, something I can use to get every bit of performance out of
it?

Thanks guys / girls,

Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top