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., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
24 #ifndef ProcessingInstruction_H
25 #define ProcessingInstruction_H
27 #include "CachedResourceClient.h"
28 #include "ContainerNode.h"
35 class ProcessingInstruction : public ContainerNode, private CachedResourceClient
38 ProcessingInstruction(Document*);
39 ProcessingInstruction(Document*, const String& target, const String& data);
40 virtual ~ProcessingInstruction();
42 // DOM methods & attributes for Notation
43 String target() const { return m_target; }
44 String data() const { return m_data; }
45 void setData(const String&, ExceptionCode&);
47 virtual String nodeName() const;
48 virtual NodeType nodeType() const;
49 virtual String nodeValue() const;
50 virtual void setNodeValue(const String&, ExceptionCode&);
51 virtual PassRefPtr<Node> cloneNode(bool deep);
52 virtual bool childTypeAllowed(NodeType);
53 virtual bool offsetInCharacters() const;
55 // Other methods (not part of DOM)
56 String localHref() const { return m_localHref; }
57 StyleSheet* sheet() const { return m_sheet.get(); }
58 bool checkStyleSheet();
59 virtual void setCSSStyleSheet(const String& URL, const String& charset, const String& sheet);
61 virtual void setXSLStyleSheet(const String& URL, const String& sheet);
63 void setCSSStyleSheet(CSSStyleSheet*);
64 bool isLoading() const;
66 virtual String toString() const;
69 bool isXSL() const { return m_isXSL; }
73 void parseStyleSheet(const String& sheet);
78 CachedResource* m_cachedSheet;
79 RefPtr<StyleSheet> m_sheet;