• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdehtml
 

tdehtml

  • tdehtml
  • dom
dom_doc.cpp
1/*
2 * This file is part of the DOM implementation for KDE.
3 *
4 * (C) 1999 Lars Knoll (knoll@kde.org)
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 *
21 */
22
23#include "dom/dom_exception.h"
24#include "dom/dom_xml.h"
25#include "dom/dom2_range.h"
26#include "dom/dom2_events.h"
27#include "dom/dom2_views.h"
28#include "dom/dom2_traversal.h"
29#include "dom/html_document.h"
30#include "html/html_documentimpl.h"
31
32#include "xml/dom_docimpl.h"
33#include "xml/dom_elementimpl.h"
34
35#include <kdebug.h>
36
37namespace DOM {
38
39DOMImplementation::DOMImplementation()
40{
41 impl = 0;
42}
43
44DOMImplementation::DOMImplementation(const DOMImplementation &other)
45{
46 impl = other.impl;
47 if (impl) impl->ref();
48}
49
50DOMImplementation::DOMImplementation(DOMImplementationImpl *i)
51{
52 impl = i;
53 if (impl) impl->ref();
54}
55
56DOMImplementation &DOMImplementation::operator = (const DOMImplementation &other)
57{
58 if ( impl != other.impl ) {
59 if (impl) impl->deref();
60 impl = other.impl;
61 if (impl) impl->ref();
62 }
63 return *this;
64}
65
66DOMImplementation::~DOMImplementation()
67{
68 if (impl) impl->deref();
69}
70
71bool DOMImplementation::hasFeature( const DOMString &feature, const DOMString &version )
72{
73 if (!impl)
74 return false; // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
75
76 return impl->hasFeature(feature,version);
77}
78
79DocumentType DOMImplementation::createDocumentType ( const DOMString &qualifiedName,
80 const DOMString &publicId,
81 const DOMString &systemId )
82{
83 if (!impl)
84 throw DOMException(DOMException::NOT_FOUND_ERR);
85
86 int exceptioncode = 0;
87 DocumentTypeImpl *r = impl->createDocumentType(qualifiedName, publicId, systemId, exceptioncode);
88 if ( exceptioncode )
89 throw DOMException( exceptioncode );
90 return r;
91}
92
93Document DOMImplementation::createDocument ( const DOMString &namespaceURI,
94 const DOMString &qualifiedName,
95 const DocumentType &doctype )
96{
97 if (!impl)
98 throw DOMException(DOMException::NOT_FOUND_ERR);
99
100 int exceptioncode = 0;
101 DocumentImpl *r = impl->createDocument(namespaceURI, qualifiedName, doctype, exceptioncode );
102 if ( exceptioncode )
103 throw DOMException( exceptioncode );
104 return r;
105}
106
107HTMLDocument DOMImplementation::createHTMLDocument( const DOMString& title )
108{
109 if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
110
111 HTMLDocumentImpl* r = impl->createHTMLDocument( 0 /* ### create a view otherwise it doesn't work */);
112
113 r->open();
114
115 r->write(TQString::fromLatin1("<HTML><HEAD><TITLE>") + title.string() +
116 TQString::fromLatin1("</TITLE></HEAD>"));
117
118 return r;
119}
120
121DOMImplementation DOMImplementation::getInterface(const DOMString &feature) const
122{
123 if (!impl)
124 throw DOMException(DOMException::NOT_FOUND_ERR);
125
126 return impl->getInterface(feature);
127}
128
129CSSStyleSheet DOMImplementation::createCSSStyleSheet(const DOMString &title, const DOMString &media)
130{
131 if (!impl)
132 throw DOMException(DOMException::NOT_FOUND_ERR);
133
134 int exceptioncode = 0;
135 CSSStyleSheetImpl *r = impl->createCSSStyleSheet(title.implementation(), media.implementation(),
136 exceptioncode);
137 if ( exceptioncode )
138 throw DOMException( exceptioncode );
139 return r;
140}
141
142DOMImplementationImpl *DOMImplementation::handle() const
143{
144 return impl;
145}
146
147bool DOMImplementation::isNull() const
148{
149 return (impl == 0);
150}
151
152// ----------------------------------------------------------------------------
153
154Document::Document()
155 : Node()
156{
157 // we always want an implementation
158 impl = DOMImplementationImpl::instance()->createDocument();
159 impl->ref();
160}
161
162Document::Document(bool create)
163 : Node()
164{
165 if(create)
166 {
167 impl = DOMImplementationImpl::instance()->createDocument();
168 impl->ref();
169 }
170 else
171 impl = 0;
172// kdDebug(6090) << "Document::Document(bool)" << endl;
173}
174
175Document::Document(const Document &other) : Node(other)
176{
177// kdDebug(6090) << "Document::Document(Document &)" << endl;
178}
179
180Document::Document(DocumentImpl *i) : Node(i)
181{
182// kdDebug(6090) << "Document::Document(DocumentImpl)" << endl;
183}
184
185Document &Document::operator = (const Node &other)
186{
187 NodeImpl* ohandle = other.handle();
188 if ( impl != ohandle ) {
189 if (!ohandle || ohandle->nodeType() != DOCUMENT_NODE) {
190 if ( impl ) impl->deref();
191 impl = 0;
192 } else {
193 Node::operator =(other);
194 }
195 }
196 return *this;
197}
198
199Document &Document::operator = (const Document &other)
200{
201 Node::operator =(other);
202 return *this;
203}
204
205Document::~Document()
206{
207// kdDebug(6090) << "Document::~Document\n" << endl;
208}
209
210DocumentType Document::doctype() const
211{
212 if (impl) return ((DocumentImpl *)impl)->doctype();
213 return 0;
214}
215
216DOMImplementation Document::implementation() const
217{
218 if (impl) return ((DocumentImpl *)impl)->implementation();
219 return 0;
220}
221
222Element Document::documentElement() const
223{
224 if (impl) return ((DocumentImpl *)impl)->documentElement();
225 return 0;
226}
227
228Element Document::createElement( const DOMString &tagName )
229{
230 if (!impl)
231 throw DOMException(DOMException::NOT_FOUND_ERR);
232
233 int exceptioncode = 0;
234 ElementImpl* r = ((DocumentImpl *)impl)->createElement(tagName, &exceptioncode);
235 if ( exceptioncode )
236 throw DOMException( exceptioncode );
237 return r;
238}
239
240Element Document::createElementNS( const DOMString &namespaceURI, const DOMString &qualifiedName )
241{
242 if (!impl)
243 throw DOMException(DOMException::NOT_FOUND_ERR);
244
245 int exceptioncode = 0;
246 ElementImpl* r = ((DocumentImpl *)impl)->createElementNS(namespaceURI,qualifiedName, &exceptioncode);
247 if ( exceptioncode )
248 throw DOMException( exceptioncode );
249 return r;
250}
251
252DocumentFragment Document::createDocumentFragment( )
253{
254 if (impl) return ((DocumentImpl *)impl)->createDocumentFragment();
255 return 0;
256}
257
258Text Document::createTextNode( const DOMString &data )
259{
260 if (impl) return ((DocumentImpl *)impl)->createTextNode( data.implementation() );
261 return 0;
262}
263
264Comment Document::createComment( const DOMString &data )
265{
266 if (impl) return ((DocumentImpl *)impl)->createComment( data.implementation() );
267 return 0;
268}
269
270CDATASection Document::createCDATASection( const DOMString &data )
271{
272 // ### DOM1 spec says raise exception if html documents - what about XHTML documents?
273 if (impl) return ((DocumentImpl *)impl)->createCDATASection( data.implementation() );
274 return 0;
275}
276
277ProcessingInstruction Document::createProcessingInstruction( const DOMString &target, const DOMString &data )
278{
279 if (impl) return ((DocumentImpl *)impl)->createProcessingInstruction( target, data.implementation() );
280 return 0;
281}
282
283Attr Document::createAttribute( const DOMString &name )
284{
285 if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
286 if (name.isNull()) throw DOMException(DOMException::NOT_FOUND_ERR);
287 int exceptioncode = 0;
288 AttrImpl* a = impl->getDocument()->createAttribute(name, &exceptioncode);
289 if ( exceptioncode )
290 throw DOMException( exceptioncode );
291 return a;
292}
293
294Attr Document::createAttributeNS( const DOMString &namespaceURI, const DOMString &qualifiedName )
295{
296 if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
297 if (qualifiedName.isNull()) throw DOMException(DOMException::NAMESPACE_ERR);
298 int exceptioncode = 0;
299 AttrImpl* a = impl->getDocument()->createAttributeNS(namespaceURI, qualifiedName, &exceptioncode);
300 if ( exceptioncode )
301 throw DOMException( exceptioncode );
302 return a;
303}
304
305EntityReference Document::createEntityReference( const DOMString &name )
306{
307 if (impl) return ((DocumentImpl *)impl)->createEntityReference( name );
308 return 0;
309}
310
311Element Document::getElementById( const DOMString &elementId ) const
312{
313 if(impl) return ((DocumentImpl *)impl)->getElementById( elementId );
314 return 0;
315}
316
317NodeList Document::getElementsByTagName( const DOMString &tagName )
318{
319 if (!impl) return 0;
320 NodeImpl::Id id;
321 if ( tagName == "*" )
322 id = 0;
323 else
324 id = impl->getDocument()->getId(NodeImpl::ElementId, tagName.implementation(), false, true);
325 return new TagNodeListImpl( impl, id );
326}
327
328NodeList Document::getElementsByTagNameNS( const DOMString &namespaceURI, const DOMString &localName )
329{
330 if (!impl) return 0;
331 return new TagNodeListImpl( impl, namespaceURI, localName );
332}
333
334Node Document::importNode( const Node & importedNode, bool deep )
335{
336 if (!impl)
337 throw DOMException(DOMException::INVALID_STATE_ERR);
338
339 int exceptioncode = 0;
340 NodeImpl *r = static_cast<DocumentImpl*>(impl)->importNode(importedNode.handle(), deep, exceptioncode);
341 if (exceptioncode)
342 throw DOMException(exceptioncode);
343 return r;
344}
345
346bool Document::isHTMLDocument() const
347{
348 if (impl) return ((DocumentImpl *)impl)->isHTMLDocument();
349 return 0;
350}
351
352Range Document::createRange()
353{
354 if (impl) return ((DocumentImpl *)impl)->createRange();
355 return 0;
356}
357
358NodeIterator Document::createNodeIterator(Node root, unsigned long whatToShow,
359 NodeFilter filter, bool entityReferenceExpansion)
360{
361 if (!impl)
362 throw DOMException(DOMException::INVALID_STATE_ERR);
363
364 int exceptioncode = 0;
365 NodeIteratorImpl *r = static_cast<DocumentImpl*>(impl)->createNodeIterator(root.handle(),
366 whatToShow,filter,entityReferenceExpansion,exceptioncode);
367 if (exceptioncode)
368 throw DOMException(exceptioncode);
369 return r;
370}
371
372TreeWalker Document::createTreeWalker(Node root, unsigned long whatToShow, NodeFilter filter,
373 bool entityReferenceExpansion)
374{
375 if (!impl)
376 throw DOMException(DOMException::INVALID_STATE_ERR);
377
378 int exceptioncode = 0;
379
380 TreeWalkerImpl *tw = static_cast<DocumentImpl *>(impl)->createTreeWalker(
381 root.handle(), whatToShow, filter.handle(), entityReferenceExpansion, exceptioncode);
382 if (exceptioncode)
383 throw DOMException(exceptioncode);
384
385 return tw;
386}
387
388Event Document::createEvent(const DOMString &eventType)
389{
390 if (!impl)
391 throw DOMException(DOMException::INVALID_STATE_ERR);
392
393 int exceptioncode = 0;
394 EventImpl *r = ((DocumentImpl *)impl)->createEvent(eventType,exceptioncode);
395 if (exceptioncode)
396 throw DOMException(exceptioncode);
397 return r;
398}
399
400AbstractView Document::defaultView() const
401{
402 if (!impl)
403 throw DOMException(DOMException::INVALID_STATE_ERR);
404
405 return static_cast<DocumentImpl*>(impl)->defaultView();
406}
407
408StyleSheetList Document::styleSheets() const
409{
410 if (!impl)
411 throw DOMException(DOMException::INVALID_STATE_ERR);
412
413 return static_cast<DocumentImpl*>(impl)->styleSheets();
414}
415
416DOMString Document::preferredStylesheetSet()
417{
418 if (!impl)
419 throw DOMException(DOMException::INVALID_STATE_ERR);
420
421 return static_cast<DocumentImpl*>(impl)->preferredStylesheetSet();
422}
423
424DOMString Document::selectedStylesheetSet()
425{
426 if (!impl)
427 throw DOMException(DOMException::INVALID_STATE_ERR);
428
429 return static_cast<DocumentImpl*>(impl)->selectedStylesheetSet();
430}
431
432void Document::setSelectedStylesheetSet(const DOMString& s)
433{
434 if (!impl)
435 throw DOMException(DOMException::INVALID_STATE_ERR);
436
437 static_cast<DocumentImpl*>(impl)->setSelectedStylesheetSet(s);
438}
439
440
441TDEHTMLView *Document::view() const
442{
443 if (!impl) return 0;
444
445 return static_cast<DocumentImpl*>(impl)->view();
446}
447
448CSSStyleDeclaration Document::getOverrideStyle(const Element &elt, const DOMString &pseudoElt)
449{
450 if (!impl)
451 throw DOMException(DOMException::INVALID_STATE_ERR);
452
453 int exceptioncode = 0;
454 CSSStyleDeclarationImpl *r = ((DocumentImpl *)impl)->getOverrideStyle(static_cast<ElementImpl*>(elt.handle()),pseudoElt.implementation());
455 if (exceptioncode)
456 throw DOMException(exceptioncode);
457 return r;
458}
459
460bool Document::async() const
461{
462 if (!impl)
463 throw DOMException(DOMException::INVALID_STATE_ERR);
464
465 return static_cast<DocumentImpl*>( impl )->async( );
466}
467
468void Document::setAsync( bool b )
469{
470 if (!impl)
471 throw DOMException(DOMException::INVALID_STATE_ERR);
472
473 static_cast<DocumentImpl*>( impl )->setAsync( b );
474}
475
476void Document::abort()
477{
478 if (!impl)
479 throw DOMException(DOMException::INVALID_STATE_ERR);
480
481
482 static_cast<DocumentImpl*>( impl )->abort( );
483}
484
485void Document::load( const DOMString &uri )
486{
487 if (!impl)
488 throw DOMException(DOMException::INVALID_STATE_ERR);
489
490 static_cast<DocumentImpl*>( impl )->load( uri );
491}
492
493void Document::loadXML( const DOMString &source )
494{
495 if (!impl)
496 throw DOMException(DOMException::INVALID_STATE_ERR);
497
498
499 static_cast<DocumentImpl*>( impl )->loadXML( source );
500}
501
502bool Document::designMode() const {
503 if (!impl)
504 throw DOMException(DOMException::INVALID_STATE_ERR);
505
506 return static_cast<DocumentImpl*>( impl )->designMode();
507}
508
509void Document::setDesignMode(bool enable) {
510 if (!impl)
511 throw DOMException(DOMException::INVALID_STATE_ERR);
512
513 static_cast<DocumentImpl*>( impl )->setDesignMode( enable );
514}
515
516DOMString Document::completeURL(const DOMString& url)
517{
518 if ( !impl ) return url;
519 return static_cast<DocumentImpl*>( impl )->completeURL( url.string() );
520}
521
522DOMString Document::toString() const
523{
524 if (!impl)
525 throw DOMException(DOMException::NOT_FOUND_ERR);
526
527 return static_cast<DocumentImpl*>(impl)->toString();
528}
529
530void Document::updateRendering()
531{
532 if ( !impl ) return;
533 static_cast<DocumentImpl*>( impl )->updateRendering( );
534}
535
536void Document::addStyleSheet(const StyleSheet &sheet)
537{
538 if (!impl || sheet.isNull())
539 throw DOMException(DOMException::INVALID_STATE_ERR);
540
541 int exceptioncode;
542 static_cast<DocumentImpl*>( impl )->addStyleSheet( sheet.handle(), &exceptioncode );
543 if (exceptioncode)
544 throw DOMException(exceptioncode);
545}
546
547void Document::removeStyleSheet(const StyleSheet &sheet)
548{
549 if (!impl || sheet.isNull())
550 throw DOMException(DOMException::INVALID_STATE_ERR);
551
552 int exceptioncode;
553 static_cast<DocumentImpl*>( impl )->removeStyleSheet( sheet.handle(), &exceptioncode );
554 if (exceptioncode)
555 throw DOMException(exceptioncode);
556}
557
558// ----------------------------------------------------------------------------
559
560DocumentFragment::DocumentFragment() : Node()
561{
562}
563
564DocumentFragment::DocumentFragment(const DocumentFragment &other) : Node(other)
565{
566}
567
568DocumentFragment &DocumentFragment::operator = (const Node &other)
569{
570 NodeImpl* ohandle = other.handle();
571 if ( impl != ohandle ) {
572 if (!ohandle || ohandle->nodeType() != DOCUMENT_FRAGMENT_NODE) {
573 if ( impl ) impl->deref();
574 impl = 0;
575 } else {
576 Node::operator =(other);
577 }
578 }
579 return *this;
580}
581
582DocumentFragment &DocumentFragment::operator = (const DocumentFragment &other)
583{
584 Node::operator =(other);
585 return *this;
586}
587
588DocumentFragment::~DocumentFragment()
589{
590}
591
592DocumentFragment::DocumentFragment(DocumentFragmentImpl *i) : Node(i)
593{
594}
595
596// ----------------------------------------------------------------------------
597
598DocumentType::DocumentType()
599 : Node()
600{
601}
602
603DocumentType::DocumentType(const DocumentType &other)
604 : Node(other)
605{
606}
607
608DocumentType::DocumentType(DocumentTypeImpl *impl) : Node(impl)
609{
610}
611
612DocumentType &DocumentType::operator = (const Node &other)
613{
614 NodeImpl* ohandle = other.handle();
615 if ( impl != ohandle ) {
616 if (!ohandle || ohandle->nodeType() != DOCUMENT_TYPE_NODE) {
617 if ( impl ) impl->deref();
618 impl = 0;
619 } else {
620 Node::operator =(other);
621 }
622 }
623 return *this;
624}
625
626DocumentType &DocumentType::operator = (const DocumentType &other)
627{
628 Node::operator =(other);
629 return *this;
630}
631
632DocumentType::~DocumentType()
633{
634}
635
636DOMString DocumentType::name() const
637{
638 if (!impl)
639 return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
640
641 return static_cast<DocumentTypeImpl*>(impl)->name();
642}
643
644NamedNodeMap DocumentType::entities() const
645{
646 if (!impl)
647 return 0; // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
648
649 return static_cast<DocumentTypeImpl*>(impl)->entities();
650}
651
652NamedNodeMap DocumentType::notations() const
653{
654 if (!impl)
655 return 0; // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
656
657 return static_cast<DocumentTypeImpl*>(impl)->notations();
658}
659
660DOMString DocumentType::publicId() const
661{
662 if (!impl)
663 throw DOMException(DOMException::NOT_FOUND_ERR);
664
665 return static_cast<DocumentTypeImpl*>(impl)->publicId();
666}
667
668DOMString DocumentType::systemId() const
669{
670 if (!impl)
671 throw DOMException(DOMException::NOT_FOUND_ERR);
672
673 return static_cast<DocumentTypeImpl*>(impl)->systemId();
674}
675
676DOMString DocumentType::internalSubset() const
677{
678 if (!impl)
679 throw DOMException(DOMException::NOT_FOUND_ERR);
680
681 return static_cast<DocumentTypeImpl*>(impl)->internalSubset();
682}
683
684} // namespace
DOM::AbstractView
Introduced in DOM Level 2.
Definition: dom2_views.h:41
DOM::Attr
The Attr interface represents an attribute in an Element object.
Definition: dom_element.h:90
DOM::CDATASection
CDATA sections are used to escape blocks of text containing characters that would otherwise be regard...
Definition: dom_xml.h:67
DOM::CSSStyleDeclaration
The CSSStyleDeclaration interface represents a single CSS declaration block .
Definition: css_value.h:61
DOM::CSSStyleSheet
The CSSStyleSheet interface is a concrete interface used to represent a CSS style sheet i....
Definition: css_stylesheet.h:208
DOM::Comment
This represents the content of a comment, i.e., all the characters between the starting ' <!...
Definition: dom_text.h:224
DOM::DOMException
DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impos...
Definition: dom_exception.h:58
DOM::DOMImplementation
The DOMImplementation interface provides a number of methods for performing operations that are indep...
Definition: dom_doc.h:78
DOM::DOMImplementation::createCSSStyleSheet
CSSStyleSheet createCSSStyleSheet(const DOMString &title, const DOMString &media)
Introduced in DOM Level 2 This method is from the DOMImplementationCSS interface.
Definition: dom_doc.cpp:129
DOM::DOMImplementation::createDocumentType
DocumentType createDocumentType(const DOMString &qualifiedName, const DOMString &publicId, const DOMString &systemId)
Introduced in DOM Level 2.
Definition: dom_doc.cpp:79
DOM::DOMImplementation::hasFeature
bool hasFeature(const DOMString &feature, const DOMString &version)
Test if the DOM implementation implements a specific feature.
Definition: dom_doc.cpp:71
DOM::DOMImplementation::getInterface
DOMImplementation getInterface(const DOMString &feature) const
Introduced in DOM Level 3 This method makes available a DOMImplementation's specialized interface.
Definition: dom_doc.cpp:121
DOM::DOMImplementation::createHTMLDocument
HTMLDocument createHTMLDocument(const DOMString &title)
Introduced in DOM Level 2 This method is from the HTMLDOMImplementation interface.
Definition: dom_doc.cpp:107
DOM::DOMImplementation::createDocument
Document createDocument(const DOMString &namespaceURI, const DOMString &qualifiedName, const DocumentType &doctype)
Introduced in DOM Level 2.
Definition: dom_doc.cpp:93
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
DOM::DocumentFragment
DocumentFragment is a "lightweight" or "minimal" Document object.
Definition: dom_doc.h:992
DOM::DocumentType
Each Document has a doctype attribute whose value is either null or a DocumentType object.
Definition: dom_doc.h:1029
DOM::DocumentType::systemId
DOMString systemId() const
Introduced in DOM Level 2.
Definition: dom_doc.cpp:668
DOM::DocumentType::notations
NamedNodeMap notations() const
A NamedNodeMap containing the notations declared in the DTD.
Definition: dom_doc.cpp:652
DOM::DocumentType::publicId
DOMString publicId() const
Introduced in DOM Level 2.
Definition: dom_doc.cpp:660
DOM::DocumentType::internalSubset
DOMString internalSubset() const
Introduced in DOM Level 2.
Definition: dom_doc.cpp:676
DOM::DocumentType::entities
NamedNodeMap entities() const
A NamedNodeMap containing the general entities, both external and internal, declared in the DTD.
Definition: dom_doc.cpp:644
DOM::DocumentType::name
DOMString name() const
The name of DTD; i.e., the name immediately following the DOCTYPE keyword.
Definition: dom_doc.cpp:636
DOM::Document
The Document interface represents the entire HTML or XML document.
Definition: dom_doc.h:246
DOM::Document::createTreeWalker
TreeWalker createTreeWalker(Node root, unsigned long whatToShow, NodeFilter filter, bool entityReferenceExpansion)
Introduced in DOM Level 2 This method is from the DocumentTraversal interface.
Definition: dom_doc.cpp:372
DOM::Document::getElementById
Element getElementById(const DOMString &elementId) const
Moved from HTMLDocument in DOM Level 2 Returns the Element whose id is given by elementId.
Definition: dom_doc.cpp:311
DOM::Document::createComment
Comment createComment(const DOMString &data)
Creates a Comment node given the specified string.
Definition: dom_doc.cpp:264
DOM::Document::updateRendering
void updateRendering()
not part of the DOM
Definition: dom_doc.cpp:530
DOM::Document::createEntityReference
EntityReference createEntityReference(const DOMString &name)
Creates an EntityReference object.
Definition: dom_doc.cpp:305
DOM::Document::createDocumentFragment
DocumentFragment createDocumentFragment()
Creates an empty DocumentFragment object.
Definition: dom_doc.cpp:252
DOM::Document::getOverrideStyle
CSSStyleDeclaration getOverrideStyle(const Element &elt, const DOMString &pseudoElt)
Introduced in DOM Level 2 This method is from the DocumentCSS interface.
Definition: dom_doc.cpp:448
DOM::Document::createTextNode
Text createTextNode(const DOMString &data)
Creates a Text node given the specified string.
Definition: dom_doc.cpp:258
DOM::Document::createElementNS
Element createElementNS(const DOMString &namespaceURI, const DOMString &qualifiedName)
Introduced in DOM Level 2 Creates an element of the given qualified name and namespace URI.
Definition: dom_doc.cpp:240
DOM::Document::styleSheets
StyleSheetList styleSheets() const
Introduced in DOM Level 2 This method is from the DocumentStyle interface.
Definition: dom_doc.cpp:408
DOM::Document::load
void load(const DOMString &uri)
Introduced in DOM Level 3 This method is from the DocumentLS interface.
Definition: dom_doc.cpp:485
DOM::Document::getElementsByTagName
NodeList getElementsByTagName(const DOMString &tagname)
No Exceptions.
Definition: dom_doc.cpp:317
DOM::Document::designMode
bool designMode() const
not part of the official DOM
Definition: dom_doc.cpp:502
DOM::Document::view
TDEHTMLView * view() const
Definition: dom_doc.cpp:441
DOM::Document::preferredStylesheetSet
DOMString preferredStylesheetSet()
CSS3 mechanism for selecting alternate stylesheets using the DOM.
Definition: dom_doc.cpp:416
DOM::Document::doctype
DocumentType doctype() const
The Document Type Declaration (see DocumentType ) associated with this document.
Definition: dom_doc.cpp:210
DOM::Document::createProcessingInstruction
ProcessingInstruction createProcessingInstruction(const DOMString &target, const DOMString &data)
Creates a ProcessingInstruction node given the specified name and data strings.
Definition: dom_doc.cpp:277
DOM::Document::getElementsByTagNameNS
NodeList getElementsByTagNameNS(const DOMString &namespaceURI, const DOMString &localName)
Introduced in DOM Level 2 No Exceptions.
Definition: dom_doc.cpp:328
DOM::Document::createEvent
Event createEvent(const DOMString &eventType)
Introduced in DOM Level 2 This method is from the DocumentEvent interface.
Definition: dom_doc.cpp:388
DOM::Document::defaultView
AbstractView defaultView() const
Introduced in DOM Level 2 This method is from the DocumentView interface.
Definition: dom_doc.cpp:400
DOM::Document::loadXML
void loadXML(const DOMString &source)
Introduced in DOM Level 3 This method is from the DocumentLS interface.
Definition: dom_doc.cpp:493
DOM::Document::implementation
DOMImplementation implementation() const
The DOMImplementation object that handles this document.
Definition: dom_doc.cpp:216
DOM::Document::setDesignMode
void setDesignMode(bool enable)
not part of the official DOM
Definition: dom_doc.cpp:509
DOM::Document::documentElement
Element documentElement() const
This is a convenience attribute that allows direct access to the child node that is the root element ...
Definition: dom_doc.cpp:222
DOM::Document::abort
void abort()
Introduced in DOM Level 3 This method is from the DocumentLS interface.
Definition: dom_doc.cpp:476
DOM::Document::createAttributeNS
Attr createAttributeNS(const DOMString &namespaceURI, const DOMString &qualifiedName)
Introduced in DOM Level 2 Creates an attribute of the given qualified name and namespace URI.
Definition: dom_doc.cpp:294
DOM::Document::completeURL
DOMString completeURL(const DOMString &url)
not part of the DOM
Definition: dom_doc.cpp:516
DOM::Document::createRange
Range createRange()
Introduced in DOM Level 2 This method is from the DocumentRange interface.
Definition: dom_doc.cpp:352
DOM::Document::createCDATASection
CDATASection createCDATASection(const DOMString &data)
Creates a CDATASection node whose value is the specified string.
Definition: dom_doc.cpp:270
DOM::Document::createAttribute
Attr createAttribute(const DOMString &name)
Creates an Attr of the given name.
Definition: dom_doc.cpp:283
DOM::Document::setAsync
void setAsync(bool)
Introduced in DOM Level 3 This method is from the DocumentLS interface.
Definition: dom_doc.cpp:468
DOM::Document::async
bool async() const
Introduced in DOM Level 3 This method is from the DocumentLS interface.
Definition: dom_doc.cpp:460
DOM::Document::addStyleSheet
void addStyleSheet(const StyleSheet &sheet)
Adds a new style sheet to the list of style sheets.
Definition: dom_doc.cpp:536
DOM::Document::importNode
Node importNode(const Node &importedNode, bool deep)
Introduced in DOM Level 2.
Definition: dom_doc.cpp:334
DOM::Document::createNodeIterator
NodeIterator createNodeIterator(Node root, unsigned long whatToShow, NodeFilter filter, bool entityReferenceExpansion)
Introduced in DOM Level 2 This method is from the DocumentTraversal interface.
Definition: dom_doc.cpp:358
DOM::Document::removeStyleSheet
void removeStyleSheet(const StyleSheet &sheet)
Removes a style sheet to the list of style sheets.
Definition: dom_doc.cpp:547
DOM::Document::createElement
Element createElement(const DOMString &tagName)
Creates an element of the type specified.
Definition: dom_doc.cpp:228
DOM::Element
By far the vast majority of objects (apart from text) that authors encounter when traversing a docume...
Definition: dom_element.h:211
DOM::EntityReference
EntityReference objects may be inserted into the structure model when an entity reference is in the s...
Definition: dom_xml.h:189
DOM::Event
Introduced in DOM Level 2.
Definition: dom2_events.h:111
DOM::HTMLDocument
An HTMLDocument is the root of the HTML hierarchy and holds the entire content.
Definition: html_document.h:74
DOM::NamedNodeMap
Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can b...
Definition: dom_node.h:67
DOM::NodeFilter
Filters are objects that know how to "filter out" nodes.
Definition: dom2_traversal.h:185
DOM::NodeIterator
NodeIterators are used to step through a set of nodes, e.g.
Definition: dom2_traversal.h:61
DOM::NodeList
The NodeList interface provides the abstraction of an ordered collection of nodes,...
Definition: dom_node.h:932
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:275
DOM::Node::localName
DOMString localName() const
Introduced in DOM Level 2.
Definition: dom_node.cpp:359
DOM::Node::namespaceURI
DOMString namespaceURI() const
Introduced in DOM Level 2.
Definition: dom_node.cpp:338
DOM::ProcessingInstruction
The ProcessingInstruction interface represents a "processing instruction", used in XML as a way to ke...
Definition: dom_xml.h:260
DOM::StyleSheetList
The StyleSheetList interface provides the abstraction of an ordered collection of style sheets.
Definition: css_stylesheet.h:310
DOM::StyleSheet
The StyleSheet interface is the abstract base interface for any type of style sheet.
Definition: css_stylesheet.h:59
DOM::Text
The Text interface represents the textual content (termed character data in XML) of an Element or At...
Definition: dom_text.h:270
DOM::TreeWalker
TreeWalker objects are used to navigate a document tree or subtree using the view of the document def...
Definition: dom2_traversal.h:340
TDEHTMLView
Renders and displays HTML in a TQScrollView.
Definition: tdehtmlview.h:79
DOM
The Document Object Model (DOM) is divided into two parts, the COREDOM core DOM, specifying some core...
Definition: design.h:57

tdehtml

Skip menu "tdehtml"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdehtml

Skip menu "tdehtml"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdehtml by doxygen 1.9.4
This website is maintained by Timothy Pearson.