dom_xml.cpp
#include "dom/dom_xml.h"
#include "dom/dom_exception.h"
#include "xml/dom_textimpl.h"
#include "xml/dom_xmlimpl.h"
using namespace DOM;
CDATASection::CDATASection()
{
}
CDATASection::CDATASection(const CDATASection &) : Text()
{
}
CDATASection &CDATASection::operator = (const Node &other)
{
NodeImpl* ohandle = other.handle();
if ( impl != ohandle ) {
if (!ohandle || ohandle->nodeType() != CDATA_SECTION_NODE) {
if ( impl ) impl->deref();
impl = 0;
} else {
Node::operator =(other);
}
}
return *this;
}
CDATASection &CDATASection::operator = (const CDATASection &other)
{
Node::operator =(other);
return *this;
}
CDATASection::~CDATASection()
{
}
CDATASection::CDATASection(CDATASectionImpl *i) : Text(i)
{
}
// ----------------------------------------------------------------------------
Entity::Entity()
{
}
Entity::Entity(const Entity &) : Node()
{
}
Entity &Entity::operator = (const Node &other)
{
NodeImpl* ohandle = other.handle();
if ( impl != ohandle ) {
if (!ohandle || ohandle->nodeType() != ENTITY_NODE) {
if ( impl ) impl->deref();
impl = 0;
} else {
Node::operator =(other);
}
}
return *this;
}
Entity &Entity::operator = (const Entity &other)
{
Node::operator =(other);
return *this;
}
Entity::~Entity()
{
}
DOMString Entity::publicId() const
{
if (!impl)
return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
return ((EntityImpl*)impl)->publicId();
}
DOMString Entity::systemId() const
{
if (!impl)
return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
return ((EntityImpl*)impl)->systemId();
}
DOMString Entity::notationName() const
{
if (!impl)
return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
return ((EntityImpl*)impl)->notationName();
}
Entity::Entity(EntityImpl *i) : Node(i)
{
}
// ----------------------------------------------------------------------------
EntityReference::EntityReference()
{
}
EntityReference::EntityReference(const EntityReference &) : Node()
{
}
EntityReference &EntityReference::operator = (const Node &other)
{
NodeImpl* ohandle = other.handle();
if ( impl != ohandle ) {
if (!ohandle || ohandle->nodeType() != ENTITY_REFERENCE_NODE) {
if ( impl ) impl->deref();
impl = 0;
} else {
Node::operator =(other);
}
}
return *this;
}
EntityReference &EntityReference::operator = (const EntityReference &other)
{
Node::operator =(other);
return *this;
}
EntityReference::~EntityReference()
{
}
EntityReference::EntityReference(EntityReferenceImpl *i) : Node(i)
{
}
// ----------------------------------------------------------------------------
Notation::Notation()
{
}
Notation::Notation(const Notation &) : Node()
{
}
Notation &Notation::operator = (const Node &other)
{
NodeImpl* ohandle = other.handle();
if ( impl != ohandle ) {
if (!ohandle || ohandle->nodeType() != NOTATION_NODE) {
if ( impl ) impl->deref();
impl = 0;
} else {
Node::operator =(other);
}
}
return *this;
}
Notation &Notation::operator = (const Notation &other)
{
Node::operator =(other);
return *this;
}
Notation::~Notation()
{
}
DOMString Notation::publicId() const
{
if (!impl)
return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
return ((NotationImpl*)impl)->publicId();
}
DOMString Notation::systemId() const
{
if (!impl)
return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
return ((NotationImpl*)impl)->systemId();
}
Notation::Notation(NotationImpl *i) : Node(i)
{
}
// ----------------------------------------------------------------------------
ProcessingInstruction::ProcessingInstruction()
{
}
ProcessingInstruction::ProcessingInstruction(const ProcessingInstruction &)
: Node()
{
}
ProcessingInstruction &ProcessingInstruction::operator = (const Node &other)
{
NodeImpl* ohandle = other.handle();
if ( impl != ohandle ) {
if (!ohandle || ohandle->nodeType() != PROCESSING_INSTRUCTION_NODE) {
if ( impl ) impl->deref();
impl = 0;
} else {
Node::operator =(other);
}
}
return *this;
}
ProcessingInstruction &ProcessingInstruction::operator = (const ProcessingInstruction &other)
{
Node::operator =(other);
return *this;
}
ProcessingInstruction::~ProcessingInstruction()
{
}
DOMString ProcessingInstruction::target() const
{
if (!impl)
return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
return ((ProcessingInstructionImpl*)impl)->target();
}
DOMString ProcessingInstruction::data() const
{
if (!impl)
return DOMString(); // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
return ((ProcessingInstructionImpl*)impl)->data();
}
void ProcessingInstruction::setData( const DOMString &_data )
{
if (!impl)
return; // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
int exceptioncode = 0;
((ProcessingInstructionImpl*)impl)->setData(_data, exceptioncode);
if (exceptioncode)
throw DOMException(exceptioncode);
}
ProcessingInstruction::ProcessingInstruction(ProcessingInstructionImpl *i) : Node(i)
{
}
StyleSheet ProcessingInstruction::sheet() const
{
if (impl) return ((ProcessingInstructionImpl*)impl)->sheet();
return 0;
}
DOM::Entity::systemId
DOMString systemId() const
The system identifier associated with the entity, if specified.
Definition: dom_xml.cpp:108
DOM::ProcessingInstruction
The ProcessingInstruction interface represents a "processing instruction", used in XML as a way to ke...
Definition: dom_xml.h:259
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:274
DOM::Entity::notationName
DOMString notationName() const
For unparsed entities, the name of the notation for the entity.
Definition: dom_xml.cpp:116
DOM::ProcessingInstruction::target
DOMString target() const
The target of this processing instruction.
Definition: dom_xml.cpp:256
DOM::ProcessingInstruction::setData
void setData(const DOMString &)
see data NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
Definition: dom_xml.cpp:272
DOM::ProcessingInstruction::data
DOMString data() const
The content of this processing instruction.
Definition: dom_xml.cpp:264
DOM::Entity
This interface represents an entity, either parsed or unparsed, in an XML document.
Definition: dom_xml.h:124
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::Notation::publicId
DOMString publicId() const
The public identifier of this notation.
Definition: dom_xml.cpp:200
DOM::Entity::publicId
DOMString publicId() const
The public identifier associated with the entity, if specified.
Definition: dom_xml.cpp:100
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::Notation::systemId
DOMString systemId() const
The system identifier of this notation.
Definition: dom_xml.cpp:208
DOM::ProcessingInstruction::sheet
StyleSheet sheet() const
Introduced in DOM Level 2 This method is from the LinkStyle interface.
Definition: dom_xml.cpp:287
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
DOM::CDATASection
CDATA sections are used to escape blocks of text containing characters that would otherwise be regard...
Definition: dom_xml.h:66
DOM::StyleSheet
The StyleSheet interface is the abstract base interface for any type of style sheet.
Definition: css_stylesheet.h:58
DOM::Notation
This interface represents a notation declared in the DTD.
Definition: dom_xml.h:222

KDE Home | KDE Accessibility Home | Description of Access Keys