Fix for bug 56087 (XSLTProcessor::TransformDocument can't work on existing document). r=harishd, sr=heikki.

git-svn-id: svn://10.0.0.236/trunk@119095 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterv%netscape.com
2002-04-16 09:26:04 +00:00
parent a5d4b479a4
commit c4c01eee2c

View File

@@ -2375,6 +2375,8 @@ XSLTProcessor::TransformDocument(nsIDOMNode* aSourceDOM,
}
mDocument->Reset(channel, loadGroup);
nsCOMPtr<nsIContent> 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();