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"
15 #define NS_ITRANSFORMOBSERVER_IID \
16 { 0x04b2d17c, 0xe98d, 0x45f5, \
17 { 0x9a, 0x67, 0xb7, 0x01, 0x19, 0x59, 0x7d, 0xe7 } }
19 class nsITransformObserver
: public nsISupports
23 NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITRANSFORMOBSERVER_IID
)
25 NS_IMETHOD
OnDocumentCreated(nsIDocument
*aResultDocument
) = 0;
27 NS_IMETHOD
OnTransformDone(nsresult aResult
,
28 nsIDocument
*aResultDocument
) = 0;
32 NS_DEFINE_STATIC_IID_ACCESSOR(nsITransformObserver
, NS_ITRANSFORMOBSERVER_IID
)
34 #define NS_IDOCUMENTTRANSFORMER_IID \
35 { 0xf45e1ff8, 0x50f3, 0x4496, \
36 { 0xb3, 0xa2, 0x0e, 0x03, 0xe8, 0x4a, 0x57, 0x11 } }
38 class nsIDocumentTransformer
: public nsISupports
42 NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOCUMENTTRANSFORMER_IID
)
44 NS_IMETHOD
SetTransformObserver(nsITransformObserver
* aObserver
) = 0;
45 NS_IMETHOD
LoadStyleSheet(nsIURI
* aUri
, nsIDocument
* aLoaderDocument
) = 0;
46 NS_IMETHOD
SetSourceContentModel(nsIDOMNode
* aSource
) = 0;
47 NS_IMETHOD
CancelLoads() = 0;
49 NS_IMETHOD
AddXSLTParamNamespace(const nsString
& aPrefix
,
50 const nsString
& aNamespace
) = 0;
51 NS_IMETHOD
AddXSLTParam(const nsString
& aName
,
52 const nsString
& aNamespace
,
53 const nsString
& aValue
,
54 const nsString
& aSelect
,
55 nsIDOMNode
* aContextNode
) = 0;
58 NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocumentTransformer
,
59 NS_IDOCUMENTTRANSFORMER_IID
)
61 #endif //nsIDocumentTransformer_h__