From 887dab6e90404b8c01c947fd6f8a1b67b821eb79 Mon Sep 17 00:00:00 2001 From: "peterv%netscape.com" Date: Tue, 16 Apr 2002 09:26:04 +0000 Subject: [PATCH] Fix for bug 56087 (XSLTProcessor::TransformDocument can't work on existing document). r=harishd, sr=heikki. --- extensions/transformiix/source/xslt/XSLTProcessor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/extensions/transformiix/source/xslt/XSLTProcessor.cpp b/extensions/transformiix/source/xslt/XSLTProcessor.cpp index 995700db87c9..3446a795869d 100644 --- a/extensions/transformiix/source/xslt/XSLTProcessor.cpp +++ b/extensions/transformiix/source/xslt/XSLTProcessor.cpp @@ -2375,6 +2375,8 @@ XSLTProcessor::TransformDocument(nsIDOMNode* aSourceDOM, } mDocument->Reset(channel, loadGroup); + nsCOMPtr root; + // Start of block to ensure the destruction of the ProcessorState // before the destruction of the documents. { @@ -2433,6 +2435,11 @@ XSLTProcessor::TransformDocument(nsIDOMNode* aSourceDOM, // End of block to ensure the destruction of the ProcessorState // before the destruction of the documents. + mOutputHandler->getRootContent(getter_AddRefs(root)); + if (root) { + mDocument->ContentInserted(nsnull, root, 0); + } + mObserver = aObserver; SignalTransformEnd();