dom_xmlimpl.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _DOM_XmlImpl_h_
00025 #define _DOM_XmlImpl_h_
00026
00027 #include "xml/dom_nodeimpl.h"
00028 #include "misc/loader_client.h"
00029
00030 #include <qxml.h>
00031
00032 namespace khtml {
00033 class CachedCSSStyleSheet;
00034 }
00035
00036 namespace DOM {
00037
00038 class DocumentImpl;
00039 class CSSStyleSheetImpl;
00040 class StyleSheetImpl;
00041 class DOMString;
00042
00043 class EntityImpl : public NodeBaseImpl
00044 {
00045 public:
00046 EntityImpl(DocumentPtr *doc);
00047 EntityImpl(DocumentPtr *doc, DOMString _name);
00048 EntityImpl(DocumentPtr *doc, DOMString _publicId, DOMString _systemId, DOMString _notationName);
00049 virtual ~EntityImpl();
00050
00051
00052
00053 virtual DOMString publicId() const;
00054 virtual DOMString systemId() const;
00055 virtual DOMString notationName() const;
00056
00057
00058
00059 virtual DOMString nodeName() const;
00060 virtual unsigned short nodeType() const;
00061 virtual NodeImpl *cloneNode ( bool deep );
00062
00063
00064
00065 virtual bool childTypeAllowed( unsigned short type );
00066
00067 protected:
00068 DOMStringImpl *m_publicId;
00069 DOMStringImpl *m_systemId;
00070 DOMStringImpl *m_notationName;
00071 DOMStringImpl *m_name;
00072 };
00073
00074
00075 class EntityReferenceImpl : public NodeBaseImpl
00076 {
00077 public:
00078 EntityReferenceImpl(DocumentPtr *doc);
00079 EntityReferenceImpl(DocumentPtr *doc, DOMStringImpl *_entityName);
00080 virtual ~EntityReferenceImpl();
00081
00082
00083
00084 virtual DOMString nodeName() const;
00085 virtual unsigned short nodeType() const;
00086 virtual NodeImpl *cloneNode ( bool deep );
00087
00088
00089
00090 virtual bool childTypeAllowed( unsigned short type );
00091
00092 protected:
00093 DOMStringImpl *m_entityName;
00094 };
00095
00096 class NotationImpl : public NodeBaseImpl
00097 {
00098 public:
00099 NotationImpl(DocumentPtr *doc);
00100 NotationImpl(DocumentPtr *doc, DOMString _name, DOMString _publicId, DOMString _systemId);
00101 virtual ~NotationImpl();
00102
00103
00104
00105 virtual DOMString publicId() const;
00106 virtual DOMString systemId() const;
00107
00108
00109
00110 virtual DOMString nodeName() const;
00111 virtual unsigned short nodeType() const;
00112 virtual NodeImpl *cloneNode ( bool deep );
00113
00114
00115
00116 virtual bool childTypeAllowed( unsigned short type );
00117 protected:
00118 DOMStringImpl *m_name;
00119 DOMStringImpl *m_publicId;
00120 DOMStringImpl *m_systemId;
00121 };
00122
00123
00124 class ProcessingInstructionImpl : public NodeBaseImpl, private khtml::CachedObjectClient
00125 {
00126 public:
00127 ProcessingInstructionImpl(DocumentPtr *doc);
00128 ProcessingInstructionImpl(DocumentPtr *doc, DOMString _target, DOMString _data);
00129 virtual ~ProcessingInstructionImpl();
00130
00131
00132
00133 virtual DOMString target() const;
00134 DOMString data() const { return m_data; }
00135 virtual void setData( const DOMString &_data, int &exceptioncode );
00136
00137
00138
00139 virtual DOMString nodeName() const;
00140 virtual unsigned short nodeType() const;
00141 virtual DOMString nodeValue() const;
00142 virtual void setNodeValue( const DOMString &_nodeValue, int &exceptioncode );
00143 virtual NodeImpl *cloneNode ( bool deep );
00144
00145
00146
00147 virtual DOMString localHref() const;
00148 virtual bool childTypeAllowed( unsigned short type );
00149 StyleSheetImpl *sheet() const;
00150 void checkStyleSheet();
00151 virtual void setStyleSheet(const DOM::DOMString &url, const DOM::DOMString &sheet);
00152 virtual void setStyleSheet(CSSStyleSheetImpl* sheet);
00153
00154 protected:
00155 DOMStringImpl *m_target;
00156 DOMStringImpl *m_data;
00157 DOMStringImpl *m_localHref;
00158 khtml::CachedCSSStyleSheet *m_cachedSheet;
00159 CSSStyleSheetImpl *m_sheet;
00160 };
00161
00162 class XMLAttributeReader : public QXmlDefaultHandler
00163 {
00164 public:
00165 XMLAttributeReader(QString _attrString);
00166 virtual ~XMLAttributeReader();
00167 QXmlAttributes readAttrs(bool &ok);
00168 bool startElement(const QString& namespaceURI, const QString& localName, const QString& qName, const QXmlAttributes& atts);
00169
00170 protected:
00171 QXmlAttributes attrs;
00172 QString m_attrString;
00173 };
00174
00175 }
00176
00177 #endif
This file is part of the documentation for kdelibs Version 3.1.5.