dom_doc.cpp
/*
* This file is part of the DOM implementation for KDE.
*
* (C) 1999 Lars Knoll (knoll@kde.org)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#include "dom/dom_exception.h"
#include "dom/dom_xml.h"
#include "dom/dom2_range.h"
#include "dom/dom2_events.h"
#include "dom/dom2_views.h"
#include "dom/dom2_traversal.h"
#include "dom/html_document.h"
#include "html/html_documentimpl.h"
#include "xml/dom_docimpl.h"
#include "xml/dom_elementimpl.h"
#include <kdebug.h>
namespace DOM {
DOMImplementation::DOMImplementation()
{
impl = 0;
}
DOMImplementation::DOMImplementation(const DOMImplementation &other)
{
impl = other.impl;
if (impl) impl->ref();
}
DOMImplementation::DOMImplementation(DOMImplementationImpl *i)
{
impl = i;
if (impl) impl->ref();
}
DOMImplementation &DOMImplementation::operator = (const DOMImplementation &other)
{
if ( impl != other.impl ) {
if (impl) impl->deref();
impl = other.impl;
if (impl) impl->ref();
}
return *this;
}
DOMImplementation::~DOMImplementation()
{
if (impl) impl->deref();
}
bool DOMImplementation::hasFeature( const DOMString &feature, const DOMString &version )
{
if (!impl)
return false; // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
return impl->hasFeature(feature,version);
}
DocumentType DOMImplementation::createDocumentType ( const DOMString &qualifiedName,
const DOMString &publicId,
const DOMString &systemId )
{
if (!impl)
throw DOMException(DOMException::NOT_FOUND_ERR);
int exceptioncode = 0;
DocumentTypeImpl *r = impl->createDocumentType(qualifiedName, publicId, systemId, exceptioncode);
if ( exceptioncode )
throw DOMException( exceptioncode );
return r;
}
Document DOMImplementation::createDocument ( const DOMString &namespaceURI,
const DOMString &qualifiedName,
const DocumentType &doctype )
{
if (!impl)
throw DOMException(DOMException::NOT_FOUND_ERR);
int exceptioncode = 0;
DocumentImpl *r = impl->createDocument(namespaceURI, qualifiedName, doctype, exceptioncode );
if ( exceptioncode )
throw DOMException( exceptioncode );
return r;
}
HTMLDocument DOMImplementation::createHTMLDocument( const DOMString& title )
{
if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
HTMLDocumentImpl* r = impl->createHTMLDocument( 0 /* ### create a view otherwise it doesn't work */);
r->open();
r->write(QString::fromLatin1("<HTML><HEAD><TITLE>") + title.string() +
QString::fromLatin1("</TITLE></HEAD>"));
return r;
}
DOMImplementation DOMImplementation::getInterface(const DOMString &feature) const
{
if (!impl)
throw DOMException(DOMException::NOT_FOUND_ERR);
return impl->getInterface(feature);
}
CSSStyleSheet DOMImplementation::createCSSStyleSheet(const DOMString &title, const DOMString &media)
{
if (!impl)
throw DOMException(DOMException::NOT_FOUND_ERR);
int exceptioncode = 0;
CSSStyleSheetImpl *r = impl->createCSSStyleSheet(title.implementation(), media.implementation(),
exceptioncode);
if ( exceptioncode )
throw DOMException( exceptioncode );
return r;
}
DOMImplementationImpl *DOMImplementation::handle() const
{
return impl;
}
bool DOMImplementation::isNull() const
{
return (impl == 0);
}
// ----------------------------------------------------------------------------
Document::Document()
: Node()
{
// we always want an implementation
impl = DOMImplementationImpl::instance()->createDocument();
impl->ref();
}
Document::Document(bool create)
: Node()
{
if(create)
{
impl = DOMImplementationImpl::instance()->createDocument();
impl->ref();
}
else
impl = 0;
// kdDebug(6090) << "Document::Document(bool)" << endl;
}
Document::Document(const Document &other) : Node(other)
{
// kdDebug(6090) << "Document::Document(Document &)" << endl;
}
Document::Document(DocumentImpl *i) : Node(i)
{
// kdDebug(6090) << "Document::Document(DocumentImpl)" << endl;
}
Document &Document::operator = (const Node &other)
{
NodeImpl* ohandle = other.handle();
if ( impl != ohandle ) {
if (!ohandle || ohandle->nodeType() != DOCUMENT_NODE) {
if ( impl ) impl->deref();
impl = 0;
} else {
Node::operator =(other);
}
}
return *this;
}
Document &Document::operator = (const Document &other)
{
Node::operator =(other);
return *this;
}
Document::~Document()
{
// kdDebug(6090) << "Document::~Document\n" << endl;
}
DocumentType Document::doctype() const
{
if (impl) return ((DocumentImpl *)impl)->doctype();
return 0;
}
DOMImplementation Document::implementation() const
{
if (impl) return ((DocumentImpl *)impl)->implementation();
return 0;
}
Element Document::documentElement() const
{
if (impl) return ((DocumentImpl *)impl)->documentElement();
return 0;
}
Element Document::createElement( const DOMString &tagName )
{
if (!impl)
throw DOMException(DOMException::NOT_FOUND_ERR);
int exceptioncode = 0;
ElementImpl* r = ((DocumentImpl *)impl)->createElement(tagName, &exceptioncode);
if ( exceptioncode )
throw DOMException( exceptioncode );
return r;
}
Element Document::createElementNS( const DOMString &namespaceURI, const DOMString &qualifiedName )
{
if (!impl)
throw DOMException(DOMException::NOT_FOUND_ERR);
int exceptioncode = 0;
ElementImpl* r = ((DocumentImpl *)impl)->createElementNS(namespaceURI,qualifiedName, &exceptioncode);
if ( exceptioncode )
throw DOMException( exceptioncode );
return r;
}
DocumentFragment Document::createDocumentFragment( )
{
if (impl) return ((DocumentImpl *)impl)->createDocumentFragment();
return 0;
}
Text Document::createTextNode( const DOMString &data )
{
if (impl) return ((DocumentImpl *)impl)->createTextNode( data.implementation() );
return 0;
}
Comment Document::createComment( const DOMString &data )
{
if (impl) return ((DocumentImpl *)impl)->createComment( data.implementation() );
return 0;
}
CDATASection Document::createCDATASection( const DOMString &data )
{
// ### DOM1 spec says raise exception if html documents - what about XHTML documents?
if (impl) return ((DocumentImpl *)impl)->createCDATASection( data.implementation() );
return 0;
}
ProcessingInstruction Document::createProcessingInstruction( const DOMString &target, const DOMString &data )
{
if (impl) return ((DocumentImpl *)impl)->createProcessingInstruction( target, data.implementation() );
return 0;
}
Attr Document::createAttribute( const DOMString &name )
{
if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
if (name.isNull()) throw DOMException(DOMException::NOT_FOUND_ERR);
int exceptioncode = 0;
AttrImpl* a = impl->getDocument()->createAttribute(name, &exceptioncode);
if ( exceptioncode )
throw DOMException( exceptioncode );
return a;
}
Attr Document::createAttributeNS( const DOMString &namespaceURI, const DOMString &qualifiedName )
{
if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
if (qualifiedName.isNull()) throw DOMException(DOMException::NAMESPACE_ERR);
int exceptioncode = 0;
AttrImpl* a = impl->getDocument()->createAttributeNS(namespaceURI, qualifiedName, &exceptioncode);
if ( exceptioncode )
throw DOMException( exceptioncode );
return a;
}
EntityReference Document::createEntityReference( const DOMString &name )
{
if (impl) return ((DocumentImpl *)impl)->createEntityReference( name );
return 0;
}
Element Document::getElementById( const DOMString &elementId ) const
{
if(impl) return ((DocumentImpl *)impl)->getElementById( elementId );
return 0;
}
NodeList Document::getElementsByTagName( const DOMString &tagName )
{
if (!impl) return 0;
NodeImpl::Id id;
if ( tagName == "*" )
id = 0;
else
id = impl->getDocument()->getId(NodeImpl::ElementId, tagName.implementation(), false, true);
return new TagNodeListImpl( impl, id );
}
NodeList Document::getElementsByTagNameNS( const DOMString &namespaceURI, const DOMString &localName )
{
if (!impl) return 0;
return new TagNodeListImpl( impl, namespaceURI, localName );
}
Node Document::importNode( const Node & importedNode, bool deep )
{
if (!impl)
throw DOMException(DOMException::INVALID_STATE_ERR);
int exceptioncode = 0;
NodeImpl *r = static_cast<DocumentImpl*>(impl)->importNode(importedNode.handle(), deep, exceptioncode);
if (exceptioncode)
throw DOMException(exceptioncode);
return r;
}
bool Document::isHTMLDocument() const
{
if (impl) return ((DocumentImpl *)impl)->isHTMLDocument();
return 0;
}
Range Document::createRange()
{
if (impl) return ((DocumentImpl *)impl)->createRange();
return 0;
}
NodeIterator Document::createNodeIterator(Node root, unsigned long whatToShow,
NodeFilter filter, bool entityReferenceExpansion)
{
if (!impl)
throw DOMException(DOMException::INVALID_STATE_ERR);
int exceptioncode = 0;
NodeIteratorImpl *r = static_cast<DocumentImpl*>(impl)->createNodeIterator(root.handle(),
whatToShow,filter,entityReferenceExpansion,exceptioncode);
if (exceptioncode)
throw DOMException(exceptioncode);
return r;
}
TreeWalker Document::createTreeWalker(Node root, unsigned long whatToShow, NodeFilter filter,
bool entityReferenceExpansion)
{
if (!impl)
throw DOMException(DOMException::INVALID_STATE_ERR);
int exceptioncode = 0;
TreeWalkerImpl *tw = static_cast<DocumentImpl *>(impl)->createTreeWalker(
root.handle(), whatToShow, filter.handle(), entityReferenceExpansion, exceptioncode);
if (exceptioncode)
throw DOMException(exceptioncode);
return tw;
}
Event Document::createEvent(const DOMString &eventType)
{
if (!impl)
throw DOMException(DOMException::INVALID_STATE_ERR);
int exceptioncode = 0;
EventImpl *r = ((DocumentImpl *)impl)->createEvent(eventType,exceptioncode);
if (exceptioncode)
throw DOMException(exceptioncode);
return r;
}
AbstractView Document::defaultView() const
{
if (!impl)
throw DOMException(DOMException::INVALID_STATE_ERR);
return static_cast<DocumentImpl*>(impl)->defaultView();
}
StyleSheetList Document::styleSheets() const
{
if (!impl)
throw DOMException(DOMException::INVALID_STATE_ERR);
return static_cast<DocumentImpl*>(impl)->styleSheets();
}
DOMString Document::preferredStylesheetSet()
{
if (!impl)
throw DOMException(DOMException::INVALID_STATE_ERR);
return static_cast<DocumentImpl*>(impl)->preferredStylesheetSet();
}
DOMString Document::selectedStylesheetSet()
{
if (!impl)
throw DOMException(DOMException::INVALID_STATE_ERR);
return static_cast<DocumentImpl*>(impl)->selectedStylesheetSet();
}
void Document::setSelectedStylesheetSet(const DOMString& s)
{
if (!impl)
throw DOMException(DOMException::INVALID_STATE_ERR);
static_cast<DocumentImpl*>(impl)->setSelectedStylesheetSet(s);
}
KHTMLView *Document::view() const
{
if (!impl) return 0;
return static_cast<DocumentImpl*>(impl)->view();
}
CSSStyleDeclaration Document::getOverrideStyle(const Element &elt, const DOMString &pseudoElt)
{
if (!impl)
throw DOMException(DOMException::INVALID_STATE_ERR);
int exceptioncode = 0;
CSSStyleDeclarationImpl *r = ((DocumentImpl *)impl)->getOverrideStyle(static_cast<ElementImpl*>(elt.handle()),pseudoElt.implementation());
if (exceptioncode)
throw DOMException(exceptioncode);
return r;
}
bool Document::async() const
{
if (!impl)
throw DOMException(DOMException::INVALID_STATE_ERR);
return static_cast<DocumentImpl*>( impl )->async( );
}
void Document::setAsync( bool b )
{
if (!impl)
throw DOMException(DOMException::INVALID_STATE_ERR);
static_cast<DocumentImpl*>( impl )->setAsync( b );
}
void Document::abort()
{
if (!impl)
throw DOMException(DOMException::INVALID_STATE_ERR);
static_cast<DocumentImpl*>( impl )->abort( );
}
void Document::load( const DOMString &uri )
{
if (!impl)
throw DOMException(DOMException::INVALID_STATE_ERR);
static_cast<DocumentImpl*>( impl )->load( uri );
}
void Document::loadXML( const DOMString &source )
{
if (!impl)
throw DOMException(DOMException::INVALID_STATE_ERR);
static_cast<DocumentImpl*>( impl )->loadXML( source );
}
bool Document::designMode() const {
if (!impl)
throw DOMException(DOMException::INVALID_STATE_ERR);
return static_cast<DocumentImpl*>( impl )->designMode();
}
void Document::setDesignMode(bool enable) {
if (!impl)
throw DOMException(DOMException::INVALID_STATE_ERR);
static_cast<DocumentImpl*>( impl )->setDesignMode( enable );
}
DOMString Document::completeURL(const DOMString& url)
{
if ( !impl ) return url;
return static_cast<DocumentImpl*>( impl )->completeURL( url.string() );
}
DOMString Document::toString() const
{
if (!impl)
throw DOMException(DOMException::NOT_FOUND_ERR);
return static_cast<DocumentImpl*>(impl)->toString();
}
void Document::updateRendering()
{
if ( !impl ) return;
static_cast<DocumentImpl*>( impl )->updateRendering( );
}
void Document::addStyleSheet(const StyleSheet &sheet)
{
if (!impl || sheet.isNull())
throw DOMException(DOMException::INVALID_STATE_ERR);
int exceptioncode;
static_cast<DocumentImpl*>( impl )->addStyleSheet( sheet.handle(), &exceptioncode );
if (exceptioncode)
throw DOMException(exceptioncode);
}
void Document::removeStyleSheet(const StyleSheet &sheet)
{
if (!impl || sheet.isNull())
throw DOMException(DOMException::INVALID_STATE_ERR);
int exceptioncode;
static_cast<DocumentImpl*>( impl )->removeStyleSheet( sheet.handle(), &exceptioncode );
if (exceptioncode)
throw DOMException(exceptioncode);
}
// ----------------------------------------------------------------------------
DocumentFragment::DocumentFragment() : Node()
{
}
DocumentFragment::DocumentFragment(const DocumentFragment &other) : Node(other)
{
}
DocumentFragment &DocumentFragment::operator = (const Node &other)
{
NodeImpl* ohandle = other.handle();
if ( impl != ohandle ) {
if (!ohandle || ohandle->nodeType() != DOCUMENT_FRAGMENT_NODE) {
if ( impl ) impl->deref();
impl = 0;
} else {
Node::operator =(other);
}
}
return *this;
}
DocumentFragment &DocumentFragment::operator = (const DocumentFragment &other)
{
Node::operator =(other);
return *this;
}
DocumentFragment::~DocumentFragment()
{
}
DocumentFragment::DocumentFragment(DocumentFragmentImpl *i) : Node(i)
{
}
// ----------------------------------------------------------------------------
DocumentType::DocumentType()
: Node()
{
}
DocumentType::DocumentType(const DocumentType &other)
: Node(other)
{
}
DocumentType::DocumentType(DocumentTypeImpl *impl) : Node(impl)
{
}
DocumentType &DocumentType::operator = (const Node &other)
{
NodeImpl* ohandle = other.handle();
if ( impl != ohandle ) {
if (!ohandle || ohandle->nodeType() != DOCUMENT_TYPE_NODE) {
if ( impl ) impl->deref();
impl = 0;
} else {
Node::operator =(other);
}
}
return *this;
}
DocumentType &DocumentType::operator = (const DocumentType &other)
{
Node::operator =(other);
return *this;
}
DocumentType::~DocumentType()
{
}
DOMString DocumentType::name() const
{
if (!impl)
return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
return static_cast<DocumentTypeImpl*>(impl)->name();
}
NamedNodeMap DocumentType::entities() const
{
if (!impl)
return 0; // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
return static_cast<DocumentTypeImpl*>(impl)->entities();
}
NamedNodeMap DocumentType::notations() const
{
if (!impl)
return 0; // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
return static_cast<DocumentTypeImpl*>(impl)->notations();
}
DOMString DocumentType::publicId() const
{
if (!impl)
throw DOMException(DOMException::NOT_FOUND_ERR);
return static_cast<DocumentTypeImpl*>(impl)->publicId();
}
DOMString DocumentType::systemId() const
{
if (!impl)
throw DOMException(DOMException::NOT_FOUND_ERR);
return static_cast<DocumentTypeImpl*>(impl)->systemId();
}
DOMString DocumentType::internalSubset() const
{
if (!impl)
throw DOMException(DOMException::NOT_FOUND_ERR);
return static_cast<DocumentTypeImpl*>(impl)->internalSubset();
}
} // 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
KHTMLView
Renders and displays HTML in a QScrollView.
Definition: khtmlview.h:78
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::Document::view
KHTMLView * view() const
Definition: dom_doc.cpp:441
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::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::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
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

KDE Home | KDE Accessibility Home | Description of Access Keys