• 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 
37 namespace DOM {
38 
39 DOMImplementation::DOMImplementation()
40 {
41  impl = 0;
42 }
43 
44 DOMImplementation::DOMImplementation(const DOMImplementation &other)
45 {
46  impl = other.impl;
47  if (impl) impl->ref();
48 }
49 
50 DOMImplementation::DOMImplementation(DOMImplementationImpl *i)
51 {
52  impl = i;
53  if (impl) impl->ref();
54 }
55 
56 DOMImplementation &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 
66 DOMImplementation::~DOMImplementation()
67 {
68  if (impl) impl->deref();
69 }
70 
71 bool 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 
79 DocumentType 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 
93 Document 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 
107 HTMLDocument 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 
121 DOMImplementation 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 
129 CSSStyleSheet 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 
142 DOMImplementationImpl *DOMImplementation::handle() const
143 {
144  return impl;
145 }
146 
147 bool DOMImplementation::isNull() const
148 {
149  return (impl == 0);
150 }
151 
152 // ----------------------------------------------------------------------------
153 
154 Document::Document()
155  : Node()
156 {
157  // we always want an implementation
158  impl = DOMImplementationImpl::instance()->createDocument();
159  impl->ref();
160 }
161 
162 Document::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 
175 Document::Document(const Document &other) : Node(other)
176 {
177 // kdDebug(6090) << "Document::Document(Document &)" << endl;
178 }
179 
180 Document::Document(DocumentImpl *i) : Node(i)
181 {
182 // kdDebug(6090) << "Document::Document(DocumentImpl)" << endl;
183 }
184 
185 Document &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 
199 Document &Document::operator = (const Document &other)
200 {
201  Node::operator =(other);
202  return *this;
203 }
204 
205 Document::~Document()
206 {
207 // kdDebug(6090) << "Document::~Document\n" << endl;
208 }
209 
210 DocumentType Document::doctype() const
211 {
212  if (impl) return ((DocumentImpl *)impl)->doctype();
213  return 0;
214 }
215 
216 DOMImplementation Document::implementation() const
217 {
218  if (impl) return ((DocumentImpl *)impl)->implementation();
219  return 0;
220 }
221 
222 Element Document::documentElement() const
223 {
224  if (impl) return ((DocumentImpl *)impl)->documentElement();
225  return 0;
226 }
227 
228 Element 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 
240 Element 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 
252 DocumentFragment Document::createDocumentFragment( )
253 {
254  if (impl) return ((DocumentImpl *)impl)->createDocumentFragment();
255  return 0;
256 }
257 
258 Text Document::createTextNode( const DOMString &data )
259 {
260  if (impl) return ((DocumentImpl *)impl)->createTextNode( data.implementation() );
261  return 0;
262 }
263 
264 Comment Document::createComment( const DOMString &data )
265 {
266  if (impl) return ((DocumentImpl *)impl)->createComment( data.implementation() );
267  return 0;
268 }
269 
270 CDATASection 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 
277 ProcessingInstruction Document::createProcessingInstruction( const DOMString &target, const DOMString &data )
278 {
279  if (impl) return ((DocumentImpl *)impl)->createProcessingInstruction( target, data.implementation() );
280  return 0;
281 }
282 
283 Attr 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 
294 Attr 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 
305 EntityReference Document::createEntityReference( const DOMString &name )
306 {
307  if (impl) return ((DocumentImpl *)impl)->createEntityReference( name );
308  return 0;
309 }
310 
311 Element Document::getElementById( const DOMString &elementId ) const
312 {
313  if(impl) return ((DocumentImpl *)impl)->getElementById( elementId );
314  return 0;
315 }
316 
317 NodeList 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 
328 NodeList Document::getElementsByTagNameNS( const DOMString &namespaceURI, const DOMString &localName )
329 {
330  if (!impl) return 0;
331  return new TagNodeListImpl( impl, namespaceURI, localName );
332 }
333 
334 Node 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 
346 bool Document::isHTMLDocument() const
347 {
348  if (impl) return ((DocumentImpl *)impl)->isHTMLDocument();
349  return 0;
350 }
351 
352 Range Document::createRange()
353 {
354  if (impl) return ((DocumentImpl *)impl)->createRange();
355  return 0;
356 }
357 
358 NodeIterator 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 
372 TreeWalker 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 
388 Event 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 
400 AbstractView Document::defaultView() const
401 {
402  if (!impl)
403  throw DOMException(DOMException::INVALID_STATE_ERR);
404 
405  return static_cast<DocumentImpl*>(impl)->defaultView();
406 }
407 
408 StyleSheetList Document::styleSheets() const
409 {
410  if (!impl)
411  throw DOMException(DOMException::INVALID_STATE_ERR);
412 
413  return static_cast<DocumentImpl*>(impl)->styleSheets();
414 }
415 
416 DOMString Document::preferredStylesheetSet()
417 {
418  if (!impl)
419  throw DOMException(DOMException::INVALID_STATE_ERR);
420 
421  return static_cast<DocumentImpl*>(impl)->preferredStylesheetSet();
422 }
423 
424 DOMString Document::selectedStylesheetSet()
425 {
426  if (!impl)
427  throw DOMException(DOMException::INVALID_STATE_ERR);
428 
429  return static_cast<DocumentImpl*>(impl)->selectedStylesheetSet();
430 }
431 
432 void 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 
441 TDEHTMLView *Document::view() const
442 {
443  if (!impl) return 0;
444 
445  return static_cast<DocumentImpl*>(impl)->view();
446 }
447 
448 CSSStyleDeclaration 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 
460 bool Document::async() const
461 {
462  if (!impl)
463  throw DOMException(DOMException::INVALID_STATE_ERR);
464 
465  return static_cast<DocumentImpl*>( impl )->async( );
466 }
467 
468 void 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 
476 void Document::abort()
477 {
478  if (!impl)
479  throw DOMException(DOMException::INVALID_STATE_ERR);
480 
481 
482  static_cast<DocumentImpl*>( impl )->abort( );
483 }
484 
485 void 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 
493 void 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 
502 bool Document::designMode() const {
503  if (!impl)
504  throw DOMException(DOMException::INVALID_STATE_ERR);
505 
506  return static_cast<DocumentImpl*>( impl )->designMode();
507 }
508 
509 void Document::setDesignMode(bool enable) {
510  if (!impl)
511  throw DOMException(DOMException::INVALID_STATE_ERR);
512 
513  static_cast<DocumentImpl*>( impl )->setDesignMode( enable );
514 }
515 
516 DOMString Document::completeURL(const DOMString& url)
517 {
518  if ( !impl ) return url;
519  return static_cast<DocumentImpl*>( impl )->completeURL( url.string() );
520 }
521 
522 DOMString Document::toString() const
523 {
524  if (!impl)
525  throw DOMException(DOMException::NOT_FOUND_ERR);
526 
527  return static_cast<DocumentImpl*>(impl)->toString();
528 }
529 
530 void Document::updateRendering()
531 {
532  if ( !impl ) return;
533  static_cast<DocumentImpl*>( impl )->updateRendering( );
534 }
535 
536 void 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 
547 void 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 
560 DocumentFragment::DocumentFragment() : Node()
561 {
562 }
563 
564 DocumentFragment::DocumentFragment(const DocumentFragment &other) : Node(other)
565 {
566 }
567 
568 DocumentFragment &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 
582 DocumentFragment &DocumentFragment::operator = (const DocumentFragment &other)
583 {
584  Node::operator =(other);
585  return *this;
586 }
587 
588 DocumentFragment::~DocumentFragment()
589 {
590 }
591 
592 DocumentFragment::DocumentFragment(DocumentFragmentImpl *i) : Node(i)
593 {
594 }
595 
596 // ----------------------------------------------------------------------------
597 
598 DocumentType::DocumentType()
599  : Node()
600 {
601 }
602 
603 DocumentType::DocumentType(const DocumentType &other)
604  : Node(other)
605 {
606 }
607 
608 DocumentType::DocumentType(DocumentTypeImpl *impl) : Node(impl)
609 {
610 }
611 
612 DocumentType &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 
626 DocumentType &DocumentType::operator = (const DocumentType &other)
627 {
628  Node::operator =(other);
629  return *this;
630 }
631 
632 DocumentType::~DocumentType()
633 {
634 }
635 
636 DOMString 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 
644 NamedNodeMap 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 
652 NamedNodeMap 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 
660 DOMString DocumentType::publicId() const
661 {
662  if (!impl)
663  throw DOMException(DOMException::NOT_FOUND_ERR);
664 
665  return static_cast<DocumentTypeImpl*>(impl)->publicId();
666 }
667 
668 DOMString DocumentType::systemId() const
669 {
670  if (!impl)
671  throw DOMException(DOMException::NOT_FOUND_ERR);
672 
673  return static_cast<DocumentTypeImpl*>(impl)->systemId();
674 }
675 
676 DOMString 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::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::Document::styleSheets
StyleSheetList styleSheets() const
Introduced in DOM Level 2 This method is from the DocumentStyle interface.
Definition: dom_doc.cpp:408
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::ProcessingInstruction
The ProcessingInstruction interface represents a "processing instruction", used in XML as a way to ke...
Definition: dom_xml.h:259
DOM::Document::async
bool async() const
Introduced in DOM Level 3 This method is from the DocumentLS interface.
Definition: dom_doc.cpp:460
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:274
DOM::Document::createElement
Element createElement(const DOMString &tagName)
Creates an element of the type specified.
Definition: dom_doc.cpp:228
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::HTMLDocument
An HTMLDocument is the root of the HTML hierarchy and holds the entire content.
Definition: html_document.h:73
DOM::DocumentType::publicId
DOMString publicId() const
Introduced in DOM Level 2.
Definition: dom_doc.cpp:660
DOM::CSSStyleDeclaration
The CSSStyleDeclaration interface represents a single CSS declaration block .
Definition: css_value.h:60
DOM::AbstractView
Introduced in DOM Level 2.
Definition: dom2_views.h:41
DOM::Document::abort
void abort()
Introduced in DOM Level 3 This method is from the DocumentLS interface.
Definition: dom_doc.cpp:476
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::Document::preferredStylesheetSet
DOMString preferredStylesheetSet()
CSS3 mechanism for selecting alternate stylesheets using the DOM.
Definition: dom_doc.cpp:416
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::doctype
DocumentType doctype() const
The Document Type Declaration (see DocumentType ) associated with this document.
Definition: dom_doc.cpp:210
DOM::DOMImplementation
The DOMImplementation interface provides a number of methods for performing operations that are indep...
Definition: dom_doc.h:77
DOM::DocumentFragment
DocumentFragment is a "lightweight" or "minimal" Document object.
Definition: dom_doc.h:991
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::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::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::createRange
Range createRange()
Introduced in DOM Level 2 This method is from the DocumentRange interface.
Definition: dom_doc.cpp:352
DOM::DOMException
DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impos...
Definition: dom_exception.h:57
DOM::EntityReference
EntityReference objects may be inserted into the structure model when an entity reference is in the s...
Definition: dom_xml.h:188
DOM::NamedNodeMap
Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can b...
Definition: dom_node.h:66
DOM::CSSStyleSheet
The CSSStyleSheet interface is a concrete interface used to represent a CSS style sheet i...
Definition: css_stylesheet.h:207
DOM::DocumentType::systemId
DOMString systemId() const
Introduced in DOM Level 2.
Definition: dom_doc.cpp:668
DOM::Comment
This represents the content of a comment, i.e., all the characters between the starting '
Definition: dom_text.h:223
DOM::Element
By far the vast majority of objects (apart from text) that authors encounter when traversing a docume...
Definition: dom_element.h:210
DOM::Document::view
TDEHTMLView * view() const
Definition: dom_doc.cpp:441
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::Text
The Text interface represents the textual content (termed character data in XML) of an Element or At...
Definition: dom_text.h:269
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::Document::createEntityReference
EntityReference createEntityReference(const DOMString &name)
Creates an EntityReference object.
Definition: dom_doc.cpp:305
DOM::TreeWalker
TreeWalker objects are used to navigate a document tree or subtree using the view of the document def...
Definition: dom2_traversal.h:339
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::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::Attr
The Attr interface represents an attribute in an Element object.
Definition: dom_element.h:89
DOM::Document::createComment
Comment createComment(const DOMString &data)
Creates a Comment node given the specified string.
Definition: dom_doc.cpp:264
DOM::StyleSheetList
The StyleSheetList interface provides the abstraction of an ordered collection of style sheets...
Definition: css_stylesheet.h:309
DOM::Document::importNode
Node importNode(const Node &importedNode, bool deep)
Introduced in DOM Level 2.
Definition: dom_doc.cpp:334
DOM::Document::createTextNode
Text createTextNode(const DOMString &data)
Creates a Text node given the specified string.
Definition: dom_doc.cpp:258
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
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::CDATASection
CDATA sections are used to escape blocks of text containing characters that would otherwise be regard...
Definition: dom_xml.h:66
DOM::Document
The Document interface represents the entire HTML or XML document.
Definition: dom_doc.h:245
DOM::DocumentType::notations
NamedNodeMap notations() const
A NamedNodeMap containing the notations declared in the DTD.
Definition: dom_doc.cpp:652
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::NodeFilter
Filters are objects that know how to "filter out" nodes.
Definition: dom2_traversal.h:184
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::createEvent
Event createEvent(const DOMString &eventType)
Introduced in DOM Level 2 This method is from the DocumentEvent interface.
Definition: dom_doc.cpp:388
DOM::DocumentType
Each Document has a doctype attribute whose value is either null or a DocumentType object...
Definition: dom_doc.h:1028
DOM::NodeList
The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented.
Definition: dom_node.h:931
DOM::Document::setAsync
void setAsync(bool)
Introduced in DOM Level 3 This method is from the DocumentLS interface.
Definition: dom_doc.cpp:468
DOM::DocumentType::internalSubset
DOMString internalSubset() const
Introduced in DOM Level 2.
Definition: dom_doc.cpp:676
DOM::Document::createDocumentFragment
DocumentFragment createDocumentFragment()
Creates an empty DocumentFragment object.
Definition: dom_doc.cpp:252
DOM::Document::removeStyleSheet
void removeStyleSheet(const StyleSheet &sheet)
Removes a style sheet to the list of style sheets.
Definition: dom_doc.cpp:547
DOM
The Document Object Model (DOM) is divided into two parts, the COREDOM core DOM, specifying some core...
Definition: design.h:56
DOM::Document::createAttribute
Attr createAttribute(const DOMString &name)
Creates an Attr of the given name.
Definition: dom_doc.cpp:283
DOM::Event
Introduced in DOM Level 2.
Definition: dom2_events.h:111
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::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::StyleSheet
The StyleSheet interface is the abstract base interface for any type of style sheet.
Definition: css_stylesheet.h:58
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::setDesignMode
void setDesignMode(bool enable)
not part of the official DOM
Definition: dom_doc.cpp:509
DOM::Document::getElementsByTagName
NodeList getElementsByTagName(const DOMString &tagname)
No Exceptions.
Definition: dom_doc.cpp:317
DOM::NodeIterator
NodeIterators are used to step through a set of nodes, e.g.
Definition: dom2_traversal.h:60
DOM::Document::updateRendering
void updateRendering()
not part of the DOM
Definition: dom_doc.cpp:530
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::completeURL
DOMString completeURL(const DOMString &url)
not part of the DOM
Definition: dom_doc.cpp:516
DOM::Document::defaultView
AbstractView defaultView() const
Introduced in DOM Level 2 This method is from the DocumentView interface.
Definition: dom_doc.cpp:400
TDEHTMLView
Renders and displays HTML in a TQScrollView.
Definition: tdehtmlview.h:78
DOM::Document::implementation
DOMImplementation implementation() const
The DOMImplementation object that handles this document.
Definition: dom_doc.cpp:216
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::designMode
bool designMode() const
not part of the official DOM
Definition: dom_doc.cpp:502
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

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
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdehtml by doxygen 1.8.8
This website is maintained by Timothy Pearson.