http://www.w3.org/DOM/DOMTM git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@225913 13f79535-47bb-0310-9956-ffa450edef68
285 lines
10 KiB
HTML
285 lines
10 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<!--
|
|
Generated: Thu Nov 09 17:46:04 EST 2000 jfouffa.w3.org
|
|
-->
|
|
<html lang='en' xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>IDL Definitions</title>
|
|
<link rel='stylesheet' type='text/css' href='./spec.css' />
|
|
<link rel='stylesheet' type='text/css' href='W3C-REC.css' />
|
|
<link rel='next' href='java-binding.html' />
|
|
<link rel='contents' href='Overview.html#contents' />
|
|
<link rel='index' href='def-index.html' />
|
|
<link rel='previous' href='ranges.html' />
|
|
</head>
|
|
<body>
|
|
<div class='navbar' align='center'><a accesskey='p'
|
|
href='ranges.html'>previous</a> <a accesskey='n'
|
|
href='java-binding.html'>next</a> <a accesskey='c'
|
|
href='Overview.html#contents'>contents</a> <a accesskey='i'
|
|
href='def-index.html'>index</a>
|
|
|
|
<hr title='Navigation area separator' />
|
|
</div>
|
|
|
|
<div class='noprint' style='text-align: right'>
|
|
<p style='font-family: monospace;font-size:small'>13 November,
|
|
2000</p>
|
|
</div>
|
|
|
|
<div class='div1'><a id="idl" name='idl'></a>
|
|
|
|
<h1 id='idl-h1' class='adiv1'>Appendix A: IDL Definitions</h1>
|
|
|
|
<p>This appendix contains the complete OMG IDL [<a class='noxref'
|
|
href='references.html#OMGIDL'>OMGIDL</a>] for the Level 2 Document
|
|
Object Model Traversal and Range definitions. The definitions are
|
|
divided into <a href='#Traversal-IDL'>Traversal</a>, and <a
|
|
href='#Range-IDL'>Range</a>.</p>
|
|
|
|
<p>The IDL files are also available as: <a
|
|
href='idl.zip'>http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113/idl.zip</a></p>
|
|
|
|
<div class='div2'><a id="Traversal-IDL" name='Traversal-IDL'></a>
|
|
|
|
<h2 id='Traversal-IDL-h2' class='adiv2'>A.1: Document Object Model
|
|
Traversal</h2>
|
|
|
|
<h3 id='idl-traversal.idl'><a
|
|
href='idl/traversal.idl'>traversal.idl</a>:</h3>
|
|
|
|
<div class='idl-code'>
|
|
<pre>
|
|
// File: traversal.idl
|
|
|
|
#ifndef _TRAVERSAL_IDL_
|
|
#define _TRAVERSAL_IDL_
|
|
|
|
#include "dom.idl"
|
|
|
|
#pragma prefix "dom.w3c.org"
|
|
module traversal
|
|
{
|
|
|
|
typedef dom::Node Node;
|
|
|
|
interface NodeFilter;
|
|
|
|
// Introduced in DOM Level 2:
|
|
interface NodeIterator {
|
|
readonly attribute Node root;
|
|
readonly attribute unsigned long whatToShow;
|
|
readonly attribute NodeFilter filter;
|
|
readonly attribute boolean expandEntityReferences;
|
|
Node nextNode()
|
|
raises(dom::DOMException);
|
|
Node previousNode()
|
|
raises(dom::DOMException);
|
|
void detach();
|
|
};
|
|
|
|
// Introduced in DOM Level 2:
|
|
interface NodeFilter {
|
|
|
|
// Constants returned by acceptNode
|
|
const short FILTER_ACCEPT = 1;
|
|
const short FILTER_REJECT = 2;
|
|
const short FILTER_SKIP = 3;
|
|
|
|
|
|
// Constants for whatToShow
|
|
const unsigned long SHOW_ALL = 0xFFFFFFFF;
|
|
const unsigned long SHOW_ELEMENT = 0x00000001;
|
|
const unsigned long SHOW_ATTRIBUTE = 0x00000002;
|
|
const unsigned long SHOW_TEXT = 0x00000004;
|
|
const unsigned long SHOW_CDATA_SECTION = 0x00000008;
|
|
const unsigned long SHOW_ENTITY_REFERENCE = 0x00000010;
|
|
const unsigned long SHOW_ENTITY = 0x00000020;
|
|
const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x00000040;
|
|
const unsigned long SHOW_COMMENT = 0x00000080;
|
|
const unsigned long SHOW_DOCUMENT = 0x00000100;
|
|
const unsigned long SHOW_DOCUMENT_TYPE = 0x00000200;
|
|
const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x00000400;
|
|
const unsigned long SHOW_NOTATION = 0x00000800;
|
|
|
|
short acceptNode(in Node n);
|
|
};
|
|
|
|
// Introduced in DOM Level 2:
|
|
interface TreeWalker {
|
|
readonly attribute Node root;
|
|
readonly attribute unsigned long whatToShow;
|
|
readonly attribute NodeFilter filter;
|
|
readonly attribute boolean expandEntityReferences;
|
|
attribute Node currentNode;
|
|
// raises(dom::DOMException) on setting
|
|
|
|
Node parentNode();
|
|
Node firstChild();
|
|
Node lastChild();
|
|
Node previousSibling();
|
|
Node nextSibling();
|
|
Node previousNode();
|
|
Node nextNode();
|
|
};
|
|
|
|
// Introduced in DOM Level 2:
|
|
interface DocumentTraversal {
|
|
NodeIterator createNodeIterator(in Node root,
|
|
in unsigned long whatToShow,
|
|
in NodeFilter filter,
|
|
in boolean entityReferenceExpansion)
|
|
raises(dom::DOMException);
|
|
TreeWalker createTreeWalker(in Node root,
|
|
in unsigned long whatToShow,
|
|
in NodeFilter filter,
|
|
in boolean entityReferenceExpansion)
|
|
raises(dom::DOMException);
|
|
};
|
|
};
|
|
|
|
#endif // _TRAVERSAL_IDL_
|
|
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- div2 Traversal-IDL -->
|
|
<div class='div2'><a id="Range-IDL" name='Range-IDL'></a>
|
|
|
|
<h2 id='Range-IDL-h2' class='adiv2'>A.2: Document Object Model
|
|
Range</h2>
|
|
|
|
<h3 id='idl-ranges.idl'><a
|
|
href='idl/ranges.idl'>ranges.idl</a>:</h3>
|
|
|
|
<div class='idl-code'>
|
|
<pre>
|
|
// File: ranges.idl
|
|
|
|
#ifndef _RANGES_IDL_
|
|
#define _RANGES_IDL_
|
|
|
|
#include "dom.idl"
|
|
|
|
#pragma prefix "dom.w3c.org"
|
|
module ranges
|
|
{
|
|
|
|
typedef dom::Node Node;
|
|
typedef dom::DocumentFragment DocumentFragment;
|
|
typedef dom::DOMString DOMString;
|
|
|
|
// Introduced in DOM Level 2:
|
|
exception RangeException {
|
|
unsigned short code;
|
|
};
|
|
// RangeExceptionCode
|
|
const unsigned short BAD_BOUNDARYPOINTS_ERR = 1;
|
|
const unsigned short INVALID_NODE_TYPE_ERR = 2;
|
|
|
|
|
|
// Introduced in DOM Level 2:
|
|
interface Range {
|
|
readonly attribute Node startContainer;
|
|
// raises(dom::DOMException) on retrieval
|
|
|
|
readonly attribute long startOffset;
|
|
// raises(dom::DOMException) on retrieval
|
|
|
|
readonly attribute Node endContainer;
|
|
// raises(dom::DOMException) on retrieval
|
|
|
|
readonly attribute long endOffset;
|
|
// raises(dom::DOMException) on retrieval
|
|
|
|
readonly attribute boolean collapsed;
|
|
// raises(dom::DOMException) on retrieval
|
|
|
|
readonly attribute Node commonAncestorContainer;
|
|
// raises(dom::DOMException) on retrieval
|
|
|
|
void setStart(in Node refNode,
|
|
in long offset)
|
|
raises(RangeException,
|
|
dom::DOMException);
|
|
void setEnd(in Node refNode,
|
|
in long offset)
|
|
raises(RangeException,
|
|
dom::DOMException);
|
|
void setStartBefore(in Node refNode)
|
|
raises(RangeException,
|
|
dom::DOMException);
|
|
void setStartAfter(in Node refNode)
|
|
raises(RangeException,
|
|
dom::DOMException);
|
|
void setEndBefore(in Node refNode)
|
|
raises(RangeException,
|
|
dom::DOMException);
|
|
void setEndAfter(in Node refNode)
|
|
raises(RangeException,
|
|
dom::DOMException);
|
|
void collapse(in boolean toStart)
|
|
raises(dom::DOMException);
|
|
void selectNode(in Node refNode)
|
|
raises(RangeException,
|
|
dom::DOMException);
|
|
void selectNodeContents(in Node refNode)
|
|
raises(RangeException,
|
|
dom::DOMException);
|
|
|
|
// CompareHow
|
|
const unsigned short START_TO_START = 0;
|
|
const unsigned short START_TO_END = 1;
|
|
const unsigned short END_TO_END = 2;
|
|
const unsigned short END_TO_START = 3;
|
|
|
|
short compareBoundaryPoints(in unsigned short how,
|
|
in Range sourceRange)
|
|
raises(dom::DOMException);
|
|
void deleteContents()
|
|
raises(dom::DOMException);
|
|
DocumentFragment extractContents()
|
|
raises(dom::DOMException);
|
|
DocumentFragment cloneContents()
|
|
raises(dom::DOMException);
|
|
void insertNode(in Node newNode)
|
|
raises(dom::DOMException,
|
|
RangeException);
|
|
void surroundContents(in Node newParent)
|
|
raises(dom::DOMException,
|
|
RangeException);
|
|
Range cloneRange()
|
|
raises(dom::DOMException);
|
|
DOMString toString()
|
|
raises(dom::DOMException);
|
|
void detach()
|
|
raises(dom::DOMException);
|
|
};
|
|
|
|
// Introduced in DOM Level 2:
|
|
interface DocumentRange {
|
|
Range createRange();
|
|
};
|
|
};
|
|
|
|
#endif // _RANGES_IDL_
|
|
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- div2 Range-IDL --></div>
|
|
|
|
<!-- div1 idl -->
|
|
<div class='navbar' align='center'>
|
|
<hr title='Navigation area separator' />
|
|
<a accesskey='p' href='ranges.html'>previous</a> <a
|
|
accesskey='n' href='java-binding.html'>next</a> <a
|
|
accesskey='c' href='Overview.html#contents'>contents</a> <a
|
|
accesskey='i' href='def-index.html'>index</a></div>
|
|
</body>
|
|
</html>
|
|
|