Author: amassari
Date: Tue Oct 25 07:53:29 2005
New Revision: 328374
URL: http://svn.apache.org/viewcvs?rev=328374&view=rev
Log:
Nodes that implement getFeature should also implement isSupported (jira# 1479)
Modified:
xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMAttrImpl.cpp
xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMDocumentTypeImpl.cpp
xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMElementNSImpl.cpp
xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMElementNSImpl.hpp
Modified: xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMAttrImpl.cpp
URL:
http://svn.apache.org/viewcvs/xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMAttrImpl.cpp?rev=328374&r1=328373&r2=328374&view=diff
==============================================================================
--- xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMAttrImpl.cpp (original)
+++ xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMAttrImpl.cpp Tue Oct
25 07:53:29 2005
@@ -297,6 +297,13 @@
fSchemaType = typeInfo;
}
+bool DOMAttrImpl::isSupported(const XMLCh *feature, const XMLCh *version) const
+{
+ // check for '+DOMPSVITypeInfo'
+ if(feature && *feature=='+' && XMLString::equals(feature+1,
XMLUni::fgXercescInterfacePSVITypeInfo))
+ return true;
+ return fNode.isSupported (feature, version);
+}
DOMNode * DOMAttrImpl::getInterface(const XMLCh* feature)
{
@@ -324,8 +331,6 @@
DOMNode* DOMAttrImpl::removeChild(DOMNode *oldChild)
{return fParent.removeChild (oldChild); }
DOMNode* DOMAttrImpl::replaceChild(DOMNode *newChild,
DOMNode *oldChild)
{return fParent.replaceChild (newChild, oldChild); }
- bool DOMAttrImpl::isSupported(const XMLCh *feature,
const XMLCh *version) const
-
{return fNode.isSupported (feature, version); }
void DOMAttrImpl::setPrefix(const XMLCh *prefix)
{fNode.setPrefix(prefix); }
bool DOMAttrImpl::hasAttributes() const
{return fNode.hasAttributes(); }
bool DOMAttrImpl::isSameNode(const DOMNode* other)
const {return fNode.isSameNode(other); }
Modified:
xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMDocumentTypeImpl.cpp
URL:
http://svn.apache.org/viewcvs/xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMDocumentTypeImpl.cpp?rev=328374&r1=328373&r2=328374&view=diff
==============================================================================
--- xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMDocumentTypeImpl.cpp
(original)
+++ xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMDocumentTypeImpl.cpp
Tue Oct 25 07:53:29 2005
@@ -424,8 +424,6 @@
DOMNode* DOMDocumentTypeImpl::removeChild(DOMNode
*oldChild) {return fParent.removeChild (oldChild); }
DOMNode* DOMDocumentTypeImpl::replaceChild(DOMNode
*newChild, DOMNode *oldChild)
{return fParent.replaceChild (newChild, oldChild); }
- bool DOMDocumentTypeImpl::isSupported(const XMLCh
*feature, const XMLCh *version) const
-
{return fNode.isSupported (feature, version); }
void DOMDocumentTypeImpl::setPrefix(const XMLCh
*prefix) {fNode.setPrefix(prefix); }
bool DOMDocumentTypeImpl::hasAttributes() const
{return fNode.hasAttributes(); }
bool DOMDocumentTypeImpl::isSameNode(const DOMNode*
other) const {return fNode.isSameNode(other); }
@@ -531,6 +529,14 @@
}
return fParent.isEqualNode(arg);
+}
+
+bool DOMDocumentTypeImpl::isSupported(const XMLCh *feature, const XMLCh
*version) const
+{
+ // check for 'DOMDocumentTypeImpl'
+ if(XMLString::equals(feature,
XMLUni::fgXercescInterfaceDOMDocumentTypeImpl))
+ return true;
+ return fNode.isSupported (feature, version);
}
DOMNode * DOMDocumentTypeImpl::getInterface(const XMLCh* feature)
Modified: xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMElementNSImpl.cpp
URL:
http://svn.apache.org/viewcvs/xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMElementNSImpl.cpp?rev=328374&r1=328373&r2=328374&view=diff
==============================================================================
--- xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMElementNSImpl.cpp
(original)
+++ xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMElementNSImpl.cpp Tue
Oct 25 07:53:29 2005
@@ -254,6 +254,14 @@
fSchemaType = typeInfo;
}
+bool DOMElementNSImpl::isSupported(const XMLCh *feature, const XMLCh *version)
const
+{
+ // check for '+DOMPSVITypeInfo'
+ if(feature && *feature=='+' && XMLString::equals(feature+1,
XMLUni::fgXercescInterfacePSVITypeInfo))
+ return true;
+ return fNode.isSupported (feature, version);
+}
+
DOMNode * DOMElementNSImpl::getInterface(const XMLCh* feature)
{
if(XMLString::equals(feature, XMLUni::fgXercescInterfacePSVITypeInfo))
Modified: xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMElementNSImpl.hpp
URL:
http://svn.apache.org/viewcvs/xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMElementNSImpl.hpp?rev=328374&r1=328373&r2=328374&view=diff
==============================================================================
--- xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMElementNSImpl.hpp
(original)
+++ xerces/c/branches/xerces-2.7/src/xercesc/dom/impl/DOMElementNSImpl.hpp Tue
Oct 25 07:53:29 2005
@@ -54,6 +54,7 @@
DOMElementNSImpl(const DOMElementNSImpl &other, bool deep=false);
virtual DOMNode * cloneNode(bool deep) const;
+ virtual bool isSupported(const XMLCh *feature, const XMLCh *version) const;
virtual DOMNode * getInterface(const XMLCh* feature);
//Introduced in DOM Level 2
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]