From 4cf21823d4978991127d15c9b39d1f54e98d2c88 Mon Sep 17 00:00:00 2001 From: "nisheeth%netscape.com" Date: Fri, 16 Jun 2000 23:29:19 +0000 Subject: [PATCH] Checking in patch from Andreas to fix Mozilla's XSL hooks (bug 36038). Does not affect the default mozilla build. --- content/xml/document/src/nsXMLContentSink.cpp | 7 +++++-- layout/xml/document/src/nsXMLContentSink.cpp | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/content/xml/document/src/nsXMLContentSink.cpp b/content/xml/document/src/nsXMLContentSink.cpp index c4c7a4c898e..41bc521c3ed 100644 --- a/content/xml/document/src/nsXMLContentSink.cpp +++ b/content/xml/document/src/nsXMLContentSink.cpp @@ -768,7 +768,10 @@ nsXMLContentSink::OpenContainer(const nsIParserNode& aNode) // For XSL, we need to wait till after the transform // to set the root content object. Hence, the following // ifndef. -#ifndef MOZ_XSL +#ifdef MOZ_XSL + if (!mXSLTransformMediator) + mDocument->SetRootContent(mDocElement); +#else mDocument->SetRootContent(mDocElement); #endif } @@ -1157,7 +1160,7 @@ nsXMLContentSink::LoadXSLStyleSheet(nsIURI* aUrl, const nsString& aType) // Set the parser as the stream listener and start the URL load nsCOMPtr sl; - rv = mParser->QueryInterface(kIStreamListenerIID, (void**)getter_AddRefs(sl)); + rv = parser->QueryInterface(kIStreamListenerIID, (void**)getter_AddRefs(sl)); if (NS_FAILED(rv)) return rv; rv = NS_OpenURI(sl, nsnull, aUrl); diff --git a/layout/xml/document/src/nsXMLContentSink.cpp b/layout/xml/document/src/nsXMLContentSink.cpp index c4c7a4c898e..41bc521c3ed 100644 --- a/layout/xml/document/src/nsXMLContentSink.cpp +++ b/layout/xml/document/src/nsXMLContentSink.cpp @@ -768,7 +768,10 @@ nsXMLContentSink::OpenContainer(const nsIParserNode& aNode) // For XSL, we need to wait till after the transform // to set the root content object. Hence, the following // ifndef. -#ifndef MOZ_XSL +#ifdef MOZ_XSL + if (!mXSLTransformMediator) + mDocument->SetRootContent(mDocElement); +#else mDocument->SetRootContent(mDocElement); #endif } @@ -1157,7 +1160,7 @@ nsXMLContentSink::LoadXSLStyleSheet(nsIURI* aUrl, const nsString& aType) // Set the parser as the stream listener and start the URL load nsCOMPtr sl; - rv = mParser->QueryInterface(kIStreamListenerIID, (void**)getter_AddRefs(sl)); + rv = parser->QueryInterface(kIStreamListenerIID, (void**)getter_AddRefs(sl)); if (NS_FAILED(rv)) return rv; rv = NS_OpenURI(sl, nsnull, aUrl);