Re: XslCompiledTransform doesn't always match the root element

Tech-Archive recommends: Fix windows errors by optimizing your registry



bolk wrote:
On 16 Dic, 17:10, Martin Honnen <mahotr...@xxxxxxxx> wrote:

Why don't you simply pass in the doc variable? That should work and that
way the XSLT style*** can find a root node.

Martin, you are right, passing doc directly solves the problem:
xsltCompiled.Transform(doc.CreateNavigator(), xsltParameters, xwriter)

You do not even need to call doc.CreateNavigator() yourself, it suffices to use
xsltCompiled.Transform(doc, xsltParameters, xwriter)


--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
.


Quantcast