2 Copyright (C) 2004 Nikolas Zimmermann <wildfox@kde.org>
3 2004 Rob Buis <buis@kde.org>
5 This file is part of the KDE project
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.
30 #include <kdom/DOMString.h>
33 * @short General namespace specific definitions.
45 CDATA_SECTION_NODE = 4,
46 ENTITY_REFERENCE_NODE = 5,
48 PROCESSING_INSTRUCTION_NODE = 7,
51 DOCUMENT_TYPE_NODE = 10,
52 DOCUMENT_FRAGMENT_NODE = 11,
59 DOMSTRING_SIZE_ERR = 2,
60 HIERARCHY_REQUEST_ERR = 3,
61 WRONG_DOCUMENT_ERR = 4,
62 INVALID_CHARACTER_ERR = 5,
63 NO_DATA_ALLOWED_ERR = 6,
64 NO_MODIFICATION_ALLOWED_ERR = 7,
66 NOT_SUPPORTED_ERR = 9,
67 INUSE_ATTRIBUTE_ERR = 10,
68 INVALID_STATE_ERR = 11,
70 INVALID_MODIFICATION_ERR = 13,
72 INVALID_ACCESS_ERR = 15,
73 VALIDATION_ERR = 16, // DOM3
74 TYPE_MISMATCH_ERR = 17 // DOM3
79 DOCUMENT_POSITION_DISCONNECTED = 0x01,
80 DOCUMENT_POSITION_PRECEDING = 0x02,
81 DOCUMENT_POSITION_FOLLOWING = 0x04,
82 DOCUMENT_POSITION_CONTAINS = 0x08,
83 DOCUMENT_POSITION_CONTAINED_BY = 0x10,
84 DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20
87 enum DerivationMethods
89 DERIVATION_RESTRICTION = 0x00000001,
90 DERIVATION_EXTENSION = 0x00000002,
91 DERIVATION_UNION = 0x00000004,
92 DERIVATION_LIST = 0x00000008
96 * A TimeStamp represents a number of milliseconds
98 typedef unsigned long long DOMTimeStamp;
101 * A macro expanding to an expression which returns true if @p
102 * n is of type element.
104 * @param n the node to check
106 #define isElementNode(n) (n->nodeType() == KDOM::ELEMENT_NODE)
107 #define isDocumentNode(n) (n->nodeType() == KDOM::DOCUMENT_NODE)
108 #define isTextNode(n) (n->nodeType() == KDOM::TEXT_NODE)
109 #define isImplicitNode(n) (false) // TODO: check that when khtml2 is ready
112 #ifndef APPLE_CHANGES
113 inline kndbgstream &operator<<(kndbgstream &stream, const DOMString &string) { return (stream << string.string()); }
115 inline kdbgstream &operator<<(kdbgstream &stream, const DOMString &string) { return (stream << string.string()); }