2
* Copyright (c) 2000 World Wide Web Consortium,
3
* (Massachusetts Institute of Technology, Institut National de
4
* Recherche en Informatique et en Automatique, Keio University). All
5
* Rights Reserved. This program is distributed under the W3C's Software
6
* Intellectual Property License. This program is distributed in the
7
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10
* See W3C License http://www.w3.org/Consortium/Legal/ for more details.
13
// File: http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113/traversal.idl
15
#ifndef _TRAVERSAL_IDL_
16
#define _TRAVERSAL_IDL_
20
#pragma prefix "dom.w3c.org"
24
typedef dom::Node Node;
28
// Introduced in DOM Level 2:
29
interface NodeIterator {
30
readonly attribute Node root;
31
readonly attribute unsigned long whatToShow;
32
readonly attribute NodeFilter filter;
33
readonly attribute boolean expandEntityReferences;
35
raises(dom::DOMException);
37
raises(dom::DOMException);
41
// Introduced in DOM Level 2:
42
interface NodeFilter {
44
// Constants returned by acceptNode
45
const short FILTER_ACCEPT = 1;
46
const short FILTER_REJECT = 2;
47
const short FILTER_SKIP = 3;
50
// Constants for whatToShow
51
const unsigned long SHOW_ALL = 0xFFFFFFFF;
52
const unsigned long SHOW_ELEMENT = 0x00000001;
53
const unsigned long SHOW_ATTRIBUTE = 0x00000002;
54
const unsigned long SHOW_TEXT = 0x00000004;
55
const unsigned long SHOW_CDATA_SECTION = 0x00000008;
56
const unsigned long SHOW_ENTITY_REFERENCE = 0x00000010;
57
const unsigned long SHOW_ENTITY = 0x00000020;
58
const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x00000040;
59
const unsigned long SHOW_COMMENT = 0x00000080;
60
const unsigned long SHOW_DOCUMENT = 0x00000100;
61
const unsigned long SHOW_DOCUMENT_TYPE = 0x00000200;
62
const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x00000400;
63
const unsigned long SHOW_NOTATION = 0x00000800;
65
short acceptNode(in Node n);
68
// Introduced in DOM Level 2:
69
interface TreeWalker {
70
readonly attribute Node root;
71
readonly attribute unsigned long whatToShow;
72
readonly attribute NodeFilter filter;
73
readonly attribute boolean expandEntityReferences;
74
attribute Node currentNode;
75
// raises(dom::DOMException) on setting
80
Node previousSibling();
86
// Introduced in DOM Level 2:
87
interface DocumentTraversal {
88
NodeIterator createNodeIterator(in Node root,
89
in unsigned long whatToShow,
91
in boolean entityReferenceExpansion)
92
raises(dom::DOMException);
93
TreeWalker createTreeWalker(in Node root,
94
in unsigned long whatToShow,
96
in boolean entityReferenceExpansion)
97
raises(dom::DOMException);
101
#endif // _TRAVERSAL_IDL_