summaryrefslogtreecommitdiffstats
path: root/dom/xslt/nsIXSLTProcessor.idl
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /dom/xslt/nsIXSLTProcessor.idl
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/xslt/nsIXSLTProcessor.idl')
-rw-r--r--dom/xslt/nsIXSLTProcessor.idl94
1 files changed, 94 insertions, 0 deletions
diff --git a/dom/xslt/nsIXSLTProcessor.idl b/dom/xslt/nsIXSLTProcessor.idl
new file mode 100644
index 000000000..ce379020d
--- /dev/null
+++ b/dom/xslt/nsIXSLTProcessor.idl
@@ -0,0 +1,94 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "domstubs.idl"
+
+interface nsIVariant;
+
+[scriptable, uuid(4a91aeb3-4100-43ee-a21e-9866268757c5)]
+interface nsIXSLTProcessor : nsISupports
+{
+ /**
+ * Import the stylesheet into this XSLTProcessor for transformations.
+ *
+ * @param style The root-node of a XSLT stylesheet. This can be either
+ * a document node or an element node. If a document node
+ * then the document can contain either a XSLT stylesheet
+ * or a LRE stylesheet.
+ * If the argument is an element node it must be the
+ * xsl:stylesheet (or xsl:transform) element of an XSLT
+ * stylesheet.
+ */
+ void importStylesheet(in nsIDOMNode style);
+
+ /**
+ * Transforms the node source applying the stylesheet given by
+ * the importStylesheet() function. The owner document of the output node
+ * owns the returned document fragment.
+ *
+ * @param source The node to be transformed
+ * @param output This document is used to generate the output
+ * @return DocumentFragment The result of the transformation
+ */
+ nsIDOMDocumentFragment transformToFragment(in nsIDOMNode source,
+ in nsIDOMDocument output);
+
+ /**
+ * Transforms the node source applying the stylesheet given by the
+ * importStylesheet() function.
+ *
+ * @param source The node to be transformed
+ * @return Document The result of the transformation
+ */
+ nsIDOMDocument transformToDocument(in nsIDOMNode source);
+
+ /**
+ * Sets a parameter to be used in subsequent transformations with this
+ * nsIXSLTProcessor. If the parameter doesn't exist in the stylesheet the
+ * parameter will be ignored.
+ *
+ * @param namespaceURI The namespaceURI of the XSLT parameter
+ * @param localName The local name of the XSLT parameter
+ * @param value The new value of the XSLT parameter
+ *
+ * @exception NS_ERROR_ILLEGAL_VALUE The datatype of value is
+ * not supported
+ */
+ void setParameter(in DOMString namespaceURI,
+ in DOMString localName,
+ in nsIVariant value);
+
+ /**
+ * Gets a parameter if previously set by setParameter. Returns null
+ * otherwise.
+ *
+ * @param namespaceURI The namespaceURI of the XSLT parameter
+ * @param localName The local name of the XSLT parameter
+ * @return nsIVariant The value of the XSLT parameter
+ */
+ nsIVariant getParameter(in DOMString namespaceURI,
+ in DOMString localName);
+ /**
+ * Removes a parameter, if set. This will make the processor use the
+ * default-value for the parameter as specified in the stylesheet.
+ *
+ * @param namespaceURI The namespaceURI of the XSLT parameter
+ * @param localName The local name of the XSLT parameter
+ */
+ void removeParameter(in DOMString namespaceURI,
+ in DOMString localName);
+
+ /**
+ * Removes all set parameters from this nsIXSLTProcessor. This will make
+ * the processor use the default-value for all parameters as specified in
+ * the stylesheet.
+ */
+ void clearParameters();
+
+ /**
+ * Remove all parameters and stylesheets from this nsIXSLTProcessor.
+ */
+ void reset();
+};