You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by bl...@apache.org on 2003/03/30 08:54:31 UTC

cvs commit: xml-security/c/src/canon XSECC14n20010315.cpp

blautenb    2003/03/29 22:54:31

  Modified:    c/src/canon XSECC14n20010315.cpp
  Log:
  Exclusive bug with inclusive namespaces
  
  Revision  Changes    Path
  1.6       +9 -4      xml-security/c/src/canon/XSECC14n20010315.cpp
  
  Index: XSECC14n20010315.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/canon/XSECC14n20010315.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XSECC14n20010315.cpp	8 Mar 2003 08:45:16 -0000	1.5
  +++ XSECC14n20010315.cpp	30 Mar 2003 06:54:30 -0000	1.6
  @@ -260,7 +260,7 @@
   
   	for (int i = 0; i < size; ++i) {
   
  -		if (strcmp((char *) ns.rawBuffer(), m_exclNSList[i]))
  +		if (!strcmp((char *) ns.rawBuffer(), m_exclNSList[i]))
   			return true;
   
   	}
  @@ -748,7 +748,7 @@
   		}
   		else {
   			formatBuffer[0] = '\0';
  -			*formatter << e->getLocalName();
  +			*formatter << a->getLocalName();
   			localName.sbStrcpyIn(formatBuffer);
   
   			processAsExclusive = !inNonExclNSList(localName);
  @@ -1282,6 +1282,11 @@
   										xmlnsFound = true;
   									}
   								}
  +								else {
  +
  +									// Doesn't have a default namespace in the node-set
  +									break;
  +								}
   							}
   						}
   
  @@ -1329,7 +1334,7 @@
   			// Did we find a non empty namespace?
   			if (xmlnsFound) {
   				
  -				currentName.sbStrcpyIn("xmlns");
  +				currentName.sbStrcpyIn("");		// Don't include xmlns prefix
   				XSECNodeListElt * toIns;
   		
   				toIns = new XSECNodeListElt;