From 3e3595cfc1320f961dbc160fb5ea925c6c9b34d2 Mon Sep 17 00:00:00 2001 From: Tinny Ng <tng@apache.org> Date: Mon, 15 Jul 2002 19:24:32 +0000 Subject: [PATCH] DOM L3: 1. Support DOMText::getIsWhitespaceInElementContent(), 2. declare a dummy DOMText::getWholeText, and DOMText::replaceWholeText 3. declare dummy DOMNode::getBaseURI, compareTreePosition, get/setTextContent, lookupNamespacePrefix, isDefaultNamespace, lookupNamespaceURI, getInterface git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@173998 13f79535-47bb-0310-9956-ffa450edef68 --- src/xercesc/dom/impl/DOMCDATASectionImpl.cpp | 25 ++++++++++++++++++++ src/xercesc/dom/impl/DOMCDATASectionImpl.hpp | 7 +++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/xercesc/dom/impl/DOMCDATASectionImpl.cpp b/src/xercesc/dom/impl/DOMCDATASectionImpl.cpp index 744643038..5da4564cf 100644 --- a/src/xercesc/dom/impl/DOMCDATASectionImpl.cpp +++ b/src/xercesc/dom/impl/DOMCDATASectionImpl.cpp @@ -158,6 +158,22 @@ DOMText *DOMCDATASectionImpl::splitText(XMLSize_t offset) }; +bool DOMCDATASectionImpl::getIsWhitespaceInElementContent() const +{ + return isIgnorableWhitespace(); +} + +const XMLCh* DOMCDATASectionImpl::getWholeText() { + throw DOMException(DOMException::NOT_SUPPORTED_ERR, 0); + return 0; +} + +DOMText* DOMCDATASectionImpl::replaceWholeText(const XMLCh* content){ + throw DOMException(DOMException::NOT_SUPPORTED_ERR, 0); + return 0; +} + + void DOMCDATASectionImpl::release() { if (fNode.isOwned() && !fNode.isToBeReleased()) @@ -208,6 +224,15 @@ void DOMCDATASectionImpl::release() void* DOMCDATASectionImpl::setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler) {return fNode.setUserData(key, data, handler); }; void* DOMCDATASectionImpl::getUserData(const XMLCh* key) const {return fNode.getUserData(key); }; + const XMLCh* DOMCDATASectionImpl::getBaseURI() const {return fNode.getBaseURI(); }; + short DOMCDATASectionImpl::compareTreePosition(DOMNode* other) {return fNode.compareTreePosition(other); }; + const XMLCh* DOMCDATASectionImpl::getTextContent() const {return fNode.getTextContent(); }; + void DOMCDATASectionImpl::setTextContent(const XMLCh* textContent){fNode.setTextContent(textContent); }; + const XMLCh* DOMCDATASectionImpl::lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) {return fNode.lookupNamespacePrefix(namespaceURI, useDefault); }; + bool DOMCDATASectionImpl::isDefaultNamespace(const XMLCh* namespaceURI) {return fNode.isDefaultNamespace(namespaceURI); }; + const XMLCh* DOMCDATASectionImpl::lookupNamespaceURI(const XMLCh* prefix) {return fNode.lookupNamespaceURI(prefix); }; + DOMNode* DOMCDATASectionImpl::getInterface(const XMLCh* feature) {return fNode.getInterface(feature); }; + // diff --git a/src/xercesc/dom/impl/DOMCDATASectionImpl.hpp b/src/xercesc/dom/impl/DOMCDATASectionImpl.hpp index c8a98b2fb..4d2a41499 100644 --- a/src/xercesc/dom/impl/DOMCDATASectionImpl.hpp +++ b/src/xercesc/dom/impl/DOMCDATASectionImpl.hpp @@ -94,8 +94,13 @@ public: // Functions inherited from TEXT virtual DOMText* splitText(XMLSize_t offset); - virtual bool isIgnorableWhitespace() const; + // DOM Level 3 + virtual bool getIsWhitespaceInElementContent() const; + virtual const XMLCh* getWholeText(); + virtual DOMText* replaceWholeText(const XMLCh* content); + // non-standard extension + virtual bool isIgnorableWhitespace() const; // Declare all of the functions from DOMNode. -- GitLab