Bumping manifests a=b2g-bump
[gecko.git] / dom / xslt / nsIXSLTProcessor.idl
blob217d0d7396ddbca1880fb96f56a83b49cc0e4ec7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "domstubs.idl"
8 interface nsIVariant;
10 [scriptable, uuid(4a91aeb3-4100-43ee-a21e-9866268757c5)]
11 interface nsIXSLTProcessor : nsISupports
13 /**
14 * Import the stylesheet into this XSLTProcessor for transformations.
16 * @param style The root-node of a XSLT stylesheet. This can be either
17 * a document node or an element node. If a document node
18 * then the document can contain either a XSLT stylesheet
19 * or a LRE stylesheet.
20 * If the argument is an element node it must be the
21 * xsl:stylesheet (or xsl:transform) element of an XSLT
22 * stylesheet.
24 * @exception nsIXSLTException
26 void importStylesheet(in nsIDOMNode style);
28 /**
29 * Transforms the node source applying the stylesheet given by
30 * the importStylesheet() function. The owner document of the output node
31 * owns the returned document fragment.
33 * @param source The node to be transformed
34 * @param output This document is used to generate the output
35 * @return DocumentFragment The result of the transformation
37 * @exception nsIXSLTException
39 nsIDOMDocumentFragment transformToFragment(in nsIDOMNode source,
40 in nsIDOMDocument output);
42 /**
43 * Transforms the node source applying the stylesheet given by the
44 * importStylesheet() function.
46 * @param source The node to be transformed
47 * @return Document The result of the transformation
49 * @exception nsIXSLTException
51 nsIDOMDocument transformToDocument(in nsIDOMNode source);
53 /**
54 * Sets a parameter to be used in subsequent transformations with this
55 * nsIXSLTProcessor. If the parameter doesn't exist in the stylesheet the
56 * parameter will be ignored.
58 * @param namespaceURI The namespaceURI of the XSLT parameter
59 * @param localName The local name of the XSLT parameter
60 * @param value The new value of the XSLT parameter
62 * @exception NS_ERROR_ILLEGAL_VALUE The datatype of value is
63 * not supported
65 void setParameter(in DOMString namespaceURI,
66 in DOMString localName,
67 in nsIVariant value);
69 /**
70 * Gets a parameter if previously set by setParameter. Returns null
71 * otherwise.
73 * @param namespaceURI The namespaceURI of the XSLT parameter
74 * @param localName The local name of the XSLT parameter
75 * @return nsIVariant The value of the XSLT parameter
77 nsIVariant getParameter(in DOMString namespaceURI,
78 in DOMString localName);
79 /**
80 * Removes a parameter, if set. This will make the processor use the
81 * default-value for the parameter as specified in the stylesheet.
83 * @param namespaceURI The namespaceURI of the XSLT parameter
84 * @param localName The local name of the XSLT parameter
86 void removeParameter(in DOMString namespaceURI,
87 in DOMString localName);
89 /**
90 * Removes all set parameters from this nsIXSLTProcessor. This will make
91 * the processor use the default-value for all parameters as specified in
92 * the stylesheet.
94 void clearParameters();
96 /**
97 * Remove all parameters and stylesheets from this nsIXSLTProcessor.
99 void reset();