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/03/08 10:33:33 UTC
cvs commit: xml-xerces/c/src/xercesc/dom/impl DOMWriterImpl.cpp
amassari 2005/03/08 01:33:32
Modified: c/src/xercesc/dom/impl DOMWriterImpl.cpp
Log:
Redeclare a namespace binding if the prefix is already bound to a different namespace (jira# 1371)
Revision Changes Path
1.56 +12 -5 xml-xerces/c/src/xercesc/dom/impl/DOMWriterImpl.cpp
Index: DOMWriterImpl.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMWriterImpl.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- DOMWriterImpl.cpp 8 Sep 2004 13:55:52 -0000 1.55
+++ DOMWriterImpl.cpp 8 Mar 2005 09:33:32 -0000 1.56
@@ -17,6 +17,9 @@
/*
* $Id$
* $Log$
+ * Revision 1.56 2005/03/08 09:33:32 amassari
+ * Redeclare a namespace binding if the prefix is already bound to a different namespace (jira# 1371)
+ *
* Revision 1.55 2004/09/08 13:55:52 peiyongz
* Apache License Version 2.0
*
@@ -1017,9 +1020,11 @@
{
RefHashTableOf<XMLCh>* curNamespaceMap=fNamespaceStack->elementAt(i);
const XMLCh* thisUri=curNamespaceMap->get((void*)prefix);
- if(thisUri && XMLString::equals(thisUri,nodeToWrite->getNamespaceURI()))
+ if(thisUri)
{
- bPrefixDeclared=true;
+ // the prefix has been declared: check if it binds to the correct namespace, otherwise, redeclare it
+ if(XMLString::equals(thisUri,nodeToWrite->getNamespaceURI()))
+ bPrefixDeclared=true;
break;
}
}
@@ -1105,9 +1110,11 @@
{
RefHashTableOf<XMLCh>* curNamespaceMap=fNamespaceStack->elementAt(i);
const XMLCh* thisUri=curNamespaceMap->get((void*)prefix);
- if(thisUri && XMLString::equals(thisUri,attribute->getNamespaceURI()))
+ if(thisUri)
{
- bPrefixDeclared=true;
+ // the prefix has been declared: check if it binds to the correct namespace, otherwise, redeclare it
+ if(XMLString::equals(thisUri,attribute->getNamespaceURI()))
+ bPrefixDeclared=true;
break;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org