4
* Phoebe DOM Implementation.
6
* This is a C++ approximation of the W3C DOM model, which follows
7
* fairly closely the specifications in the various .idl files, copies of
8
* which are provided for reference. Most important is this one:
10
* http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
15
* Copyright (C) 2005-2007 Bob Jamison
17
* This library is free software; you can redistribute it and/or
18
* modify it under the terms of the GNU Lesser General Public
19
* License as published by the Free Software Foundation; either
20
* version 2.1 of the License, or (at your option) any later version.
22
* This library is distributed in the hope that it will be useful,
23
* but WITHOUT ANY WARRANTY; without even the implied warranty of
24
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25
* Lesser General Public License for more details.
27
* You should have received a copy of the GNU Lesser General Public
28
* License along with this library; if not, write to the Free Software
29
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
34
#include "traversal.h"
38
#include "xmlreader.h"
50
/*#########################################################################
52
#########################################################################*/
57
class LSParserImpl : virtual public LSParser
70
virtual bool getBusy();
75
virtual DocumentPtr parse(const LSInput &input)
76
throw(dom::DOMException, LSException);
82
virtual DocumentPtr parseURI(const DOMString &uri)
83
throw(dom::DOMException, LSException);
88
virtual NodePtr parseWithContext(const LSInput &input,
89
const NodePtr contextArg,
90
unsigned short action)
91
throw(dom::DOMException, LSException);
107
LSParserImpl(const LSParserImpl &other) : LSParser(other)
113
virtual ~LSParserImpl()
126
LSParserFilter *filter;
133
/*#########################################################################
134
## LSParserFilterImpl
135
#########################################################################*/
140
class LSParserFilterImpl : virtual public LSParserFilter
147
virtual unsigned short startElement(const ElementPtr /*elementArg*/)
153
virtual unsigned short acceptNode(const NodePtr /*nodeArg*/)
159
virtual unsigned long getWhatToShow()
169
virtual ~LSParserFilterImpl()
176
/*#########################################################################
178
#########################################################################*/
183
class LSSerializerImpl : virtual public LSSerializer
191
virtual bool write(const NodePtr nodeArg,
192
const LSOutput &destination)
198
virtual bool writeToURI(const NodePtr nodeArg,
199
const DOMString &uri)
205
virtual DOMString writeToString(const NodePtr nodeArg)
206
throw(dom::DOMException, LSException);
223
virtual ~LSSerializerImpl()
233
void writeNode(const NodePtr nodeArg);
239
void po(char const *fmt, ...)
245
void pos(const DOMString &str);
247
void poxml(const DOMString &str);
253
DOMConfiguration *domConfig;
255
LSSerializerFilter *filter;
264
/*#########################################################################
265
## LSSerializerFilterImpl
266
#########################################################################*/
271
class LSSerializerFilterImpl : virtual public LSSerializerFilter
278
virtual unsigned long getWhatToShow()
288
virtual ~LSSerializerFilterImpl()
294
/*#########################################################################
295
## DOMImplementationLSImpl
296
#########################################################################*/
301
class DOMImplementationLSImpl : virtual public DOMImplementationLS
308
virtual LSParser &createLSParser(unsigned short /*mode*/,
309
const DOMString &/*schemaType*/)
310
throw (dom::DOMException)
312
LSParserImpl newParser;
321
virtual LSSerializer &createLSSerializer()
323
LSSerializerImpl newSerializer;
324
serializer = newSerializer;
332
virtual LSInput createLSInput()
341
virtual LSOutput createLSOutput()
354
virtual ~DOMImplementationLSImpl() {}
359
LSSerializerImpl serializer;
375
#endif /* __LSIMPL_H__ */
377
/*#########################################################################
379
#########################################################################*/