2
* Copyright (c) 2004 World Wide Web Consortium,
4
* (Massachusetts Institute of Technology, European Research Consortium for
5
* Informatics and Mathematics, Keio University). All Rights Reserved. This
6
* work is distributed under the W3C(r) Software License [1] in the hope that
7
* it will be useful, but WITHOUT ANY WARRANTY; without even the implied
8
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
* [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
13
// File: http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/ls.idl
20
#include "traversal.idl"
22
#pragma prefix "dom.w3c.org"
26
typedef Object LSInputStream;
28
typedef Object LSOutputStream;
30
typedef Object LSReader;
32
typedef Object LSWriter;
34
typedef dom::DOMString DOMString;
35
typedef dom::DOMConfiguration DOMConfiguration;
36
typedef dom::Node Node;
37
typedef dom::Document Document;
38
typedef dom::Element Element;
41
interface LSSerializer;
44
interface LSParserFilter;
45
interface LSSerializerFilter;
47
exception LSException {
51
const unsigned short PARSE_ERR = 81;
52
const unsigned short SERIALIZE_ERR = 82;
55
interface DOMImplementationLS {
57
// DOMImplementationLSMode
58
const unsigned short MODE_SYNCHRONOUS = 1;
59
const unsigned short MODE_ASYNCHRONOUS = 2;
61
LSParser createLSParser(in unsigned short mode,
62
in DOMString schemaType)
63
raises(dom::DOMException);
64
LSSerializer createLSSerializer();
65
LSInput createLSInput();
66
LSOutput createLSOutput();
70
readonly attribute DOMConfiguration domConfig;
71
attribute LSParserFilter filter;
72
readonly attribute boolean async;
73
readonly attribute boolean busy;
74
Document parse(in LSInput input)
75
raises(dom::DOMException,
77
Document parseURI(in DOMString uri)
78
raises(dom::DOMException,
82
const unsigned short ACTION_APPEND_AS_CHILDREN = 1;
83
const unsigned short ACTION_REPLACE_CHILDREN = 2;
84
const unsigned short ACTION_INSERT_BEFORE = 3;
85
const unsigned short ACTION_INSERT_AFTER = 4;
86
const unsigned short ACTION_REPLACE = 5;
88
Node parseWithContext(in LSInput input,
90
in unsigned short action)
91
raises(dom::DOMException,
97
// Depending on the language binding in use,
98
// this attribute may not be available.
99
attribute LSReader characterStream;
100
attribute LSInputStream byteStream;
101
attribute DOMString stringData;
102
attribute DOMString systemId;
103
attribute DOMString publicId;
104
attribute DOMString baseURI;
105
attribute DOMString encoding;
106
attribute boolean certifiedText;
109
interface LSResourceResolver {
110
LSInput resolveResource(in DOMString type,
111
in DOMString namespaceURI,
112
in DOMString publicId,
113
in DOMString systemId,
114
in DOMString baseURI);
117
interface LSParserFilter {
119
// Constants returned by startElement and acceptNode
120
const short FILTER_ACCEPT = 1;
121
const short FILTER_REJECT = 2;
122
const short FILTER_SKIP = 3;
123
const short FILTER_INTERRUPT = 4;
125
unsigned short startElement(in Element elementArg);
126
unsigned short acceptNode(in Node nodeArg);
127
readonly attribute unsigned long whatToShow;
130
interface LSSerializer {
131
readonly attribute DOMConfiguration domConfig;
132
attribute DOMString newLine;
133
attribute LSSerializerFilter filter;
134
boolean write(in Node nodeArg,
135
in LSOutput destination)
137
boolean writeToURI(in Node nodeArg,
140
DOMString writeToString(in Node nodeArg)
141
raises(dom::DOMException,
146
// Depending on the language binding in use,
147
// this attribute may not be available.
148
attribute LSWriter characterStream;
149
attribute LSOutputStream byteStream;
150
attribute DOMString systemId;
151
attribute DOMString encoding;
154
interface LSProgressEvent : events::Event {
155
readonly attribute LSInput input;
156
readonly attribute unsigned long position;
157
readonly attribute unsigned long totalSize;
160
interface LSLoadEvent : events::Event {
161
readonly attribute Document newDocument;
162
readonly attribute LSInput input;
165
interface LSSerializerFilter : traversal::NodeFilter {
166
readonly attribute unsigned long whatToShow;