1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef nsIDocumentTransformer_h__
6 #define nsIDocumentTransformer_h__
8 #include "nsISupports.h"
9 #include "nsStringFwd.h"
23 } // namespace mozilla
25 #define NS_ITRANSFORMOBSERVER_IID \
27 0x04b2d17c, 0xe98d, 0x45f5, { \
28 0x9a, 0x67, 0xb7, 0x01, 0x19, 0x59, 0x7d, 0xe7 \
32 class nsITransformObserver
: public nsISupports
{
34 NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITRANSFORMOBSERVER_IID
)
36 virtual nsresult
OnDocumentCreated(
37 mozilla::dom::Document
* aSourceDocument
,
38 mozilla::dom::Document
* aResultDocument
) = 0;
40 virtual nsresult
OnTransformDone(mozilla::dom::Document
* aSourceDocument
,
42 mozilla::dom::Document
* aResultDocument
) = 0;
45 NS_DEFINE_STATIC_IID_ACCESSOR(nsITransformObserver
, NS_ITRANSFORMOBSERVER_IID
)
47 #define NS_IDOCUMENTTRANSFORMER_IID \
49 0xf45e1ff8, 0x50f3, 0x4496, { \
50 0xb3, 0xa2, 0x0e, 0x03, 0xe8, 0x4a, 0x57, 0x11 \
54 class nsIDocumentTransformer
: public nsISupports
{
56 NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOCUMENTTRANSFORMER_IID
)
58 NS_IMETHOD
SetTransformObserver(nsITransformObserver
* aObserver
) = 0;
59 NS_IMETHOD
LoadStyleSheet(nsIURI
* aUri
,
60 mozilla::dom::Document
* aLoaderDocument
) = 0;
61 NS_IMETHOD
SetSourceContentModel(nsINode
* aSource
) = 0;
62 NS_IMETHOD
CancelLoads() = 0;
64 NS_IMETHOD
AddXSLTParamNamespace(const nsString
& aPrefix
,
65 const nsString
& aNamespace
) = 0;
66 NS_IMETHOD
AddXSLTParam(const nsString
& aName
, const nsString
& aNamespace
,
67 const nsString
& aValue
, const nsString
& aSelect
,
68 nsINode
* aContextNode
) = 0;
71 NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocumentTransformer
,
72 NS_IDOCUMENTTRANSFORMER_IID
)
74 #endif // nsIDocumentTransformer_h__