summaryrefslogtreecommitdiffstats
path: root/src/dom/work/xpath.idl
diff options
context:
space:
mode:
authorBob Jamison <ishmalius@gmail.com>2006-04-12 13:25:21 +0000
committerishmal <ishmal@users.sourceforge.net>2006-04-12 13:25:21 +0000
commit6fd9af13a8614a4b95e8be1518e745915ef8bb56 (patch)
treebf94fa5f7c3a7b2f581f3e7cf2522bf7c2d4b6c9 /src/dom/work/xpath.idl
parentRemoved file/folder for ishmal (diff)
downloadinkscape-6fd9af13a8614a4b95e8be1518e745915ef8bb56.tar.gz
inkscape-6fd9af13a8614a4b95e8be1518e745915ef8bb56.zip
Add new rearranged /dom directory
(bzr r479)
Diffstat (limited to 'src/dom/work/xpath.idl')
-rw-r--r--src/dom/work/xpath.idl115
1 files changed, 115 insertions, 0 deletions
diff --git a/src/dom/work/xpath.idl b/src/dom/work/xpath.idl
new file mode 100644
index 000000000..066f064b0
--- /dev/null
+++ b/src/dom/work/xpath.idl
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] in the hope that
+ * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+// File: http://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226/xpath.idl
+
+#ifndef _XPATH_IDL_
+#define _XPATH_IDL_
+
+#include "dom.idl"
+
+#pragma prefix "dom.w3c.org"
+module xpath
+{
+
+ typedef dom::DOMString DOMString;
+ typedef dom::Node Node;
+ typedef dom::DOMObject DOMObject;
+ typedef dom::Element Element;
+
+ interface XPathNSResolver;
+ interface XPathExpression;
+
+ exception XPathException {
+ unsigned short code;
+ };
+ // XPathExceptionCode
+ const unsigned short INVALID_EXPRESSION_ERR = 51;
+ const unsigned short TYPE_ERR = 52;
+
+
+ interface XPathEvaluator {
+ XPathExpression createExpression(in DOMString expression,
+ in XPathNSResolver resolver)
+ raises(XPathException,
+ dom::DOMException);
+ XPathNSResolver createNSResolver(in Node nodeResolver);
+ DOMObject evaluate(in DOMString expression,
+ in Node contextNode,
+ in XPathNSResolver resolver,
+ in unsigned short type,
+ in DOMObject result)
+ raises(XPathException,
+ dom::DOMException);
+ };
+
+ interface XPathExpression {
+ DOMObject evaluate(in Node contextNode,
+ in unsigned short type,
+ in DOMObject result)
+ raises(XPathException,
+ dom::DOMException);
+ };
+
+ interface XPathNSResolver {
+ DOMString lookupNamespaceURI(in DOMString prefix);
+ };
+
+ interface XPathResult {
+
+ // XPathResultType
+ const unsigned short ANY_TYPE = 0;
+ const unsigned short NUMBER_TYPE = 1;
+ const unsigned short STRING_TYPE = 2;
+ const unsigned short BOOLEAN_TYPE = 3;
+ const unsigned short UNORDERED_NODE_ITERATOR_TYPE = 4;
+ const unsigned short ORDERED_NODE_ITERATOR_TYPE = 5;
+ const unsigned short UNORDERED_NODE_SNAPSHOT_TYPE = 6;
+ const unsigned short ORDERED_NODE_SNAPSHOT_TYPE = 7;
+ const unsigned short ANY_UNORDERED_NODE_TYPE = 8;
+ const unsigned short FIRST_ORDERED_NODE_TYPE = 9;
+
+ readonly attribute unsigned short resultType;
+ readonly attribute double numberValue;
+ // raises(XPathException) on retrieval
+
+ readonly attribute DOMString stringValue;
+ // raises(XPathException) on retrieval
+
+ readonly attribute boolean booleanValue;
+ // raises(XPathException) on retrieval
+
+ readonly attribute Node singleNodeValue;
+ // raises(XPathException) on retrieval
+
+ readonly attribute boolean invalidIteratorState;
+ readonly attribute unsigned long snapshotLength;
+ // raises(XPathException) on retrieval
+
+ Node iterateNext()
+ raises(XPathException,
+ dom::DOMException);
+ Node snapshotItem(in unsigned long index)
+ raises(XPathException);
+ };
+
+ interface XPathNamespace : Node {
+
+ // XPathNodeType
+ const unsigned short XPATH_NAMESPACE_NODE = 13;
+
+ readonly attribute Element ownerElement;
+ };
+};
+
+#endif // _XPATH_IDL_
+