1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: documenttype.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _DOCUMENTTYPE_HXX
32 #define _DOCUMENTTYPE_HXX
34 #include <sal/types.h>
35 #include <com/sun/star/uno/Reference.h>
36 #include <com/sun/star/uno/Exception.hpp>
37 #include <com/sun/star/xml/dom/XDocumentType.hpp>
38 #include <com/sun/star/xml/dom/XNodeList.hpp>
39 #include <com/sun/star/xml/dom/XNamedNodeMap.hpp>
43 #include <libxml/tree.h>
45 using ::rtl::OUString
;
46 using namespace com::sun::star::uno
;
47 using namespace com::sun::star::xml::dom
;
51 class CDocumentType
: public cppu::ImplInheritanceHelper1
< CNode
, XDocumentType
>
58 CDocumentType(const xmlDtdPtr aDtdPtr
);
62 A NamedNodeMap containing the general entities, both external and
63 internal, declared in the DTD.
65 virtual Reference
< XNamedNodeMap
> SAL_CALL
getEntities() throw (RuntimeException
);
68 The internal subset as a string, or null if there is none.
70 virtual OUString SAL_CALL
getInternalSubset() throw (RuntimeException
);
73 The name of DTD; i.e., the name immediately following the DOCTYPE
76 virtual OUString SAL_CALL
getName() throw (RuntimeException
);
79 A NamedNodeMap containing the notations declared in the DTD.
81 virtual Reference
< XNamedNodeMap
> SAL_CALL
getNotations() throw (RuntimeException
);
84 The public identifier of the external subset.
86 virtual OUString SAL_CALL
getPublicId() throw (RuntimeException
);
89 The system identifier of the external subset.
91 virtual OUString SAL_CALL
getSystemId() throw (RuntimeException
);
93 // ---- resolve uno inheritance problems...
94 // overrides for XNode base
95 virtual OUString SAL_CALL
getNodeName()
96 throw (RuntimeException
);
97 virtual OUString SAL_CALL
getNodeValue()
98 throw (RuntimeException
);
99 // --- delegation for XNde base.
100 virtual Reference
< XNode
> SAL_CALL
appendChild(const Reference
< XNode
>& newChild
)
101 throw (RuntimeException
, DOMException
)
103 return CNode::appendChild(newChild
);
105 virtual Reference
< XNode
> SAL_CALL
cloneNode(sal_Bool deep
)
106 throw (RuntimeException
)
108 return CNode::cloneNode(deep
);
110 virtual Reference
< XNamedNodeMap
> SAL_CALL
getAttributes()
111 throw (RuntimeException
)
113 return CNode::getAttributes();
115 virtual Reference
< XNodeList
> SAL_CALL
getChildNodes()
116 throw (RuntimeException
)
118 return CNode::getChildNodes();
120 virtual Reference
< XNode
> SAL_CALL
getFirstChild()
121 throw (RuntimeException
)
123 return CNode::getFirstChild();
125 virtual Reference
< XNode
> SAL_CALL
getLastChild()
126 throw (RuntimeException
)
128 return CNode::getLastChild();
130 virtual OUString SAL_CALL
getLocalName()
131 throw (RuntimeException
)
133 return CNode::getLocalName();
135 virtual OUString SAL_CALL
getNamespaceURI()
136 throw (RuntimeException
)
138 return CNode::getNamespaceURI();
140 virtual Reference
< XNode
> SAL_CALL
getNextSibling()
141 throw (RuntimeException
)
143 return CNode::getNextSibling();
145 virtual NodeType SAL_CALL
getNodeType()
146 throw (RuntimeException
)
148 return CNode::getNodeType();
150 virtual Reference
< XDocument
> SAL_CALL
getOwnerDocument()
151 throw (RuntimeException
)
153 return CNode::getOwnerDocument();
155 virtual Reference
< XNode
> SAL_CALL
getParentNode()
156 throw (RuntimeException
)
158 return CNode::getParentNode();
160 virtual OUString SAL_CALL
getPrefix()
161 throw (RuntimeException
)
163 return CNode::getPrefix();
165 virtual Reference
< XNode
> SAL_CALL
getPreviousSibling()
166 throw (RuntimeException
)
168 return CNode::getPreviousSibling();
170 virtual sal_Bool SAL_CALL
hasAttributes()
171 throw (RuntimeException
)
173 return CNode::hasAttributes();
175 virtual sal_Bool SAL_CALL
hasChildNodes()
176 throw (RuntimeException
)
178 return CNode::hasChildNodes();
180 virtual Reference
< XNode
> SAL_CALL
insertBefore(
181 const Reference
< XNode
>& newChild
, const Reference
< XNode
>& refChild
)
182 throw (RuntimeException
, DOMException
)
184 return CNode::insertBefore(newChild
, refChild
);
186 virtual sal_Bool SAL_CALL
isSupported(const OUString
& feature
, const OUString
& ver
)
187 throw (RuntimeException
)
189 return CNode::isSupported(feature
, ver
);
191 virtual void SAL_CALL
normalize()
192 throw (RuntimeException
)
196 virtual Reference
< XNode
> SAL_CALL
removeChild(const Reference
< XNode
>& oldChild
)
197 throw (RuntimeException
, DOMException
)
199 return CNode::removeChild(oldChild
);
201 virtual Reference
< XNode
> SAL_CALL
replaceChild(
202 const Reference
< XNode
>& newChild
, const Reference
< XNode
>& oldChild
)
203 throw (RuntimeException
, DOMException
)
205 return CNode::replaceChild(newChild
, oldChild
);
207 virtual void SAL_CALL
setNodeValue(const OUString
& nodeValue
)
208 throw (RuntimeException
, DOMException
)
210 return CNode::setNodeValue(nodeValue
);
212 virtual void SAL_CALL
setPrefix(const OUString
& prefix
)
213 throw (RuntimeException
, DOMException
)
215 return CNode::setPrefix(prefix
);