You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by am...@apache.org on 2005/06/17 01:05:32 UTC
svn commit: r191025 - in /xerces/c/trunk/src/xercesc/dom: DOMDocument.hpp
impl/DOMDocumentImpl.cpp impl/DOMDocumentImpl.hpp
Author: amassari
Date: Thu Jun 16 16:05:31 2005
New Revision: 191025
URL: http://svn.apache.org/viewcvs?rev=191025&view=rev
Log:
DOMDocument::importNode accepts a const pointer (XERCESC-1223)
Modified:
xerces/c/trunk/src/xercesc/dom/DOMDocument.hpp
xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.cpp
xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.hpp
Modified: xerces/c/trunk/src/xercesc/dom/DOMDocument.hpp
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/src/xercesc/dom/DOMDocument.hpp?rev=191025&r1=191024&r2=191025&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/DOMDocument.hpp (original)
+++ xerces/c/trunk/src/xercesc/dom/DOMDocument.hpp Thu Jun 16 16:05:31 2005
@@ -356,7 +356,7 @@
* supported.
* @since DOM Level 2
*/
- virtual DOMNode *importNode(DOMNode *importedNode, bool deep) = 0;
+ virtual DOMNode *importNode(const DOMNode *importedNode, bool deep) = 0;
/**
* Creates an element of the given qualified name and namespace URI.
Modified: xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.cpp
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.cpp?rev=191025&r1=191024&r2=191025&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.cpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.cpp Thu Jun 16 16:05:31 2005
@@ -556,7 +556,7 @@
//Introduced in DOM Level 2
-DOMNode *DOMDocumentImpl::importNode(DOMNode *source, bool deep)
+DOMNode *DOMDocumentImpl::importNode(const DOMNode *source, bool deep)
{
return importNode(source, deep, false);
}
@@ -995,7 +995,7 @@
fDOMConfiguration = config;
}
-DOMNode *DOMDocumentImpl::importNode(DOMNode *source, bool deep, bool cloningDoc)
+DOMNode *DOMDocumentImpl::importNode(const DOMNode *source, bool deep, bool cloningDoc)
{
DOMNode *newnode=0;
bool oldErrorCheckingFlag = errorChecking;
@@ -1008,9 +1008,7 @@
if (source->getLocalName() == 0)
newelement = createElement(source->getNodeName());
else
- newelement = createElementNS(source->getNamespaceURI(),
-
- source->getNodeName());
+ newelement = createElementNS(source->getNamespaceURI(), source->getNodeName());
DOMNamedNodeMap *srcattr=source->getAttributes();
if(srcattr!=0)
for(XMLSize_t i=0;i<srcattr->getLength();++i)
@@ -1040,8 +1038,7 @@
if (source->getLocalName() == 0)
newnode = createAttribute(source->getNodeName());
else
- newnode = createAttributeNS(source->getNamespaceURI(),
- source->getNodeName());
+ newnode = createAttributeNS(source->getNamespaceURI(), source->getNodeName());
deep = true;
// Kids carry value
@@ -1073,8 +1070,7 @@
}
break;
case DOMNode::PROCESSING_INSTRUCTION_NODE :
- newnode = createProcessingInstruction(source->getNodeName(),
- source->getNodeValue());
+ newnode = createProcessingInstruction(source->getNodeName(), source->getNodeValue());
break;
case DOMNode::COMMENT_NODE :
newnode = createComment(source->getNodeValue());
Modified: xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.hpp
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.hpp?rev=191025&r1=191024&r2=191025&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.hpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.hpp Thu Jun 16 16:05:31 2005
@@ -202,7 +202,7 @@
}
//Introduced in DOM Level 2
- virtual DOMNode* importNode(DOMNode *source, bool deep);
+ virtual DOMNode* importNode(const DOMNode *source, bool deep);
virtual DOMElement* createElementNS(const XMLCh *namespaceURI,
const XMLCh *qualifiedName);
virtual DOMElement* createElementNS(const XMLCh *namespaceURI,
@@ -285,7 +285,7 @@
private:
//Internal helper functions
- virtual DOMNode* importNode(DOMNode *source, bool deep, bool cloningNode);
+ virtual DOMNode* importNode(const DOMNode *source, bool deep, bool cloningNode);
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org