2 * This file is part of the DOM implementation for KDE.
4 * Copyright (C) 2000 Peter Kelly (pmk@post.com)
5 * Copyright (C) 2006 Apple Computer, Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
24 #ifndef ProcessingInstruction_h
25 #define ProcessingInstruction_h
27 #include "CachedResourceClient.h"
28 #include "CachedResourceHandle.h"
29 #include "ContainerNode.h"
36 class ProcessingInstruction
: public ContainerNode
, private CachedResourceClient
39 ProcessingInstruction(Document
*);
40 ProcessingInstruction(Document
*, const String
& target
, const String
& data
);
41 virtual ~ProcessingInstruction();
43 // DOM methods & attributes for Notation
44 String
target() const { return m_target
; }
45 String
data() const { return m_data
; }
46 void setData(const String
&, ExceptionCode
&);
48 virtual String
nodeName() const;
49 virtual NodeType
nodeType() const;
50 virtual String
nodeValue() const;
51 virtual void setNodeValue(const String
&, ExceptionCode
&);
52 virtual PassRefPtr
<Node
> cloneNode(bool deep
);
53 virtual bool childTypeAllowed(NodeType
);
54 virtual bool offsetInCharacters() const;
55 virtual int maxCharacterOffset() const;
57 virtual void insertedIntoDocument();
58 virtual void removedFromDocument();
59 void setCreatedByParser(bool createdByParser
) { m_createdByParser
= createdByParser
; }
60 virtual void finishParsingChildren();
62 // Other methods (not part of DOM)
63 String
localHref() const { return m_localHref
; }
64 StyleSheet
* sheet() const { return m_sheet
.get(); }
65 void checkStyleSheet();
66 virtual void setCSSStyleSheet(const String
& url
, const String
& charset
, const CachedCSSStyleSheet
*);
68 virtual void setXSLStyleSheet(const String
& url
, const String
& sheet
);
70 void setCSSStyleSheet(PassRefPtr
<CSSStyleSheet
>);
71 bool isLoading() const;
72 virtual bool sheetLoaded();
75 bool isXSL() const { return m_isXSL
; }
78 virtual void getSubresourceAttributeStrings(Vector
<String
>&) const;
81 void parseStyleSheet(const String
& sheet
);
88 CachedResourceHandle
<CachedResource
> m_cachedSheet
;
89 RefPtr
<StyleSheet
> m_sheet
;
92 bool m_createdByParser
;