| /* |
| * Copyright 1999-2004 The Apache Software Foundation. |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| #include "XercesCommentWrapper.hpp" |
| |
| |
| |
| #include <xercesc/dom/DOMComment.hpp> |
| |
| |
| |
| #include <xalanc/DOMSupport/DOMServices.hpp> |
| |
| |
| |
| #include "XercesWrapperHelper.hpp" |
| #include "XercesWrapperNavigator.hpp" |
| #include "XercesDOMWrapperException.hpp" |
| #include "XercesDocumentWrapper.hpp" |
| |
| |
| |
| XALAN_CPP_NAMESPACE_BEGIN |
| |
| |
| |
| XercesCommentWrapper::XercesCommentWrapper( |
| const DOMCommentType* theXercesComment, |
| const XercesWrapperNavigator& theNavigator) : |
| XalanComment(), |
| m_xercesNode(theXercesComment), |
| m_navigator(theNavigator) |
| { |
| assert(theXercesComment != 0); |
| } |
| |
| |
| |
| XercesCommentWrapper::~XercesCommentWrapper() |
| { |
| } |
| |
| |
| |
| const XalanDOMString& |
| XercesCommentWrapper::getNodeName() const |
| { |
| return m_navigator.getPooledString(m_xercesNode->getNodeName()); |
| } |
| |
| |
| |
| const XalanDOMString& |
| XercesCommentWrapper::getNodeValue() const |
| { |
| return m_navigator.getPooledString(m_xercesNode->getNodeValue()); |
| } |
| |
| |
| |
| XercesCommentWrapper::NodeType |
| XercesCommentWrapper::getNodeType() const |
| { |
| return COMMENT_NODE; |
| } |
| |
| |
| |
| XalanNode* |
| XercesCommentWrapper::getParentNode() const |
| { |
| return m_navigator.getParentNode(m_xercesNode); |
| } |
| |
| |
| |
| const XalanNodeList* |
| XercesCommentWrapper::getChildNodes() const |
| { |
| return 0; |
| } |
| |
| |
| |
| XalanNode* |
| XercesCommentWrapper::getFirstChild() const |
| { |
| return 0; |
| } |
| |
| |
| |
| XalanNode* |
| XercesCommentWrapper::getLastChild() const |
| { |
| return 0; |
| } |
| |
| |
| |
| XalanNode* |
| XercesCommentWrapper::getPreviousSibling() const |
| { |
| return m_navigator.getPreviousSibling(m_xercesNode); |
| } |
| |
| |
| |
| XalanNode* |
| XercesCommentWrapper::getNextSibling() const |
| { |
| return m_navigator.getNextSibling(m_xercesNode); |
| } |
| |
| |
| |
| const XalanNamedNodeMap* |
| XercesCommentWrapper::getAttributes() const |
| { |
| return 0; |
| } |
| |
| |
| |
| XalanDocument* |
| XercesCommentWrapper::getOwnerDocument() const |
| { |
| return m_navigator.getOwnerDocument(); |
| } |
| |
| |
| |
| #if defined(XALAN_NO_COVARIANT_RETURN_TYPE) |
| XalanNode* |
| #else |
| XercesCommentWrapper* |
| #endif |
| XercesCommentWrapper::cloneNode(bool /* deep */) const |
| { |
| throw XercesDOMWrapperException(XercesDOMWrapperException::NOT_SUPPORTED_ERR); |
| |
| return 0; |
| } |
| |
| |
| |
| XalanNode* |
| XercesCommentWrapper::insertBefore( |
| XalanNode* /* newChild */, |
| XalanNode* /* refChild */) |
| { |
| throw XercesDOMWrapperException(XercesDOMWrapperException::HIERARCHY_REQUEST_ERR); |
| |
| return 0; |
| } |
| |
| |
| |
| XalanNode* |
| XercesCommentWrapper::replaceChild( |
| XalanNode* /* newChild */, |
| XalanNode* /* oldChild */) |
| { |
| throw XercesDOMWrapperException(XercesDOMWrapperException::HIERARCHY_REQUEST_ERR); |
| |
| return 0; |
| } |
| |
| |
| |
| XalanNode* |
| XercesCommentWrapper::removeChild(XalanNode* /* oldChild */) |
| { |
| throw XercesDOMWrapperException(XercesDOMWrapperException::HIERARCHY_REQUEST_ERR); |
| |
| return 0; |
| } |
| |
| |
| |
| XalanNode* |
| XercesCommentWrapper::appendChild(XalanNode* /* newChild */) |
| { |
| throw XercesDOMWrapperException(XercesDOMWrapperException::HIERARCHY_REQUEST_ERR); |
| |
| return 0; |
| } |
| |
| |
| |
| bool |
| XercesCommentWrapper::hasChildNodes() const |
| { |
| return false; |
| } |
| |
| |
| |
| void |
| XercesCommentWrapper::setNodeValue(const XalanDOMString& /* nodeValue */) |
| { |
| throw XalanDOMException(XalanDOMException::NO_MODIFICATION_ALLOWED_ERR); |
| } |
| |
| |
| |
| void |
| XercesCommentWrapper::normalize() |
| { |
| throw XalanDOMException(XalanDOMException::NO_MODIFICATION_ALLOWED_ERR); |
| } |
| |
| |
| |
| bool |
| XercesCommentWrapper::isSupported( |
| const XalanDOMString& feature, |
| const XalanDOMString& version) const |
| { |
| return XercesWrapperHelper::isSupported(m_xercesNode, feature, version); |
| } |
| |
| |
| |
| const XalanDOMString& |
| XercesCommentWrapper::getNamespaceURI() const |
| { |
| return m_navigator.getPooledString(m_xercesNode->getNamespaceURI()); |
| } |
| |
| |
| |
| const XalanDOMString& |
| XercesCommentWrapper::getPrefix() const |
| { |
| return m_navigator.getPooledString(m_xercesNode->getPrefix()); |
| } |
| |
| |
| |
| const XalanDOMString& |
| XercesCommentWrapper::getLocalName() const |
| { |
| return m_navigator.getPooledString(m_xercesNode->getLocalName()); |
| } |
| |
| |
| |
| void |
| XercesCommentWrapper::setPrefix(const XalanDOMString& /* prefix */) |
| { |
| throw XalanDOMException(XalanDOMException::NO_MODIFICATION_ALLOWED_ERR); |
| } |
| |
| |
| |
| bool |
| XercesCommentWrapper::isIndexed() const |
| { |
| return m_navigator.getOwnerDocument()->isIndexed(); |
| } |
| |
| |
| |
| XercesCommentWrapper::IndexType |
| XercesCommentWrapper::getIndex() const |
| { |
| return m_navigator.getIndex(); |
| } |
| |
| |
| |
| const XalanDOMString& |
| XercesCommentWrapper::getData() const |
| { |
| return m_navigator.getPooledString(m_xercesNode->getData()); |
| } |
| |
| |
| |
| unsigned int |
| XercesCommentWrapper::getLength() const |
| { |
| return m_xercesNode->getLength(); |
| } |
| |
| |
| |
| XalanDOMString |
| XercesCommentWrapper::substringData( |
| unsigned int offset, |
| unsigned int count) const |
| { |
| return XercesWrapperHelper::substringData(m_xercesNode, offset, count); |
| } |
| |
| |
| |
| void |
| XercesCommentWrapper::appendData(const XalanDOMString& /* arg */) |
| { |
| throw XalanDOMException(XalanDOMException::NO_MODIFICATION_ALLOWED_ERR); |
| } |
| |
| |
| |
| void |
| XercesCommentWrapper::insertData( |
| unsigned int /* offset */, |
| const XalanDOMString& /* arg */) |
| { |
| throw XalanDOMException(XalanDOMException::NO_MODIFICATION_ALLOWED_ERR); |
| } |
| |
| |
| |
| void |
| XercesCommentWrapper::deleteData( |
| unsigned int /* offset */, |
| unsigned int /* count */) |
| { |
| throw XalanDOMException(XalanDOMException::NO_MODIFICATION_ALLOWED_ERR); |
| } |
| |
| |
| |
| void |
| XercesCommentWrapper::replaceData( |
| unsigned int /* offset */, |
| unsigned int /* count */, |
| const XalanDOMString& /* arg */) |
| { |
| throw XalanDOMException(XalanDOMException::NO_MODIFICATION_ALLOWED_ERR); |
| } |
| |
| |
| |
| XALAN_CPP_NAMESPACE_END |