You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2002/10/06 06:04:49 UTC

cvs commit: xml-xalan/c/src/DOMSupport DOMServices.cpp

dbertoni    2002/10/05 21:04:48

  Modified:    c/src/DOMSupport DOMServices.cpp
  Log:
  Fixed a bug with returning the default namespace instead of the correct one.
  
  Revision  Changes    Path
  1.38      +7 -3      xml-xalan/c/src/DOMSupport/DOMServices.cpp
  
  Index: DOMServices.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/DOMSupport/DOMServices.cpp,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- DOMServices.cpp	6 May 2002 05:13:33 -0000	1.37
  +++ DOMServices.cpp	6 Oct 2002 04:04:48 -0000	1.38
  @@ -766,6 +766,7 @@
   	}
   	else
   	{
  +		const bool				isDefaultNamespace = isEmpty(prefix);
   		XalanNode::NodeType		type;
   		const XalanNode*		parent = &namespaceContext;
   
  @@ -792,11 +793,14 @@
   
   					const XalanDOMString&	aname = attr->getNodeName();
   
  -					if (equals(aname, s_XMLNamespace) == true)
  +					if (isDefaultNamespace == true)
   					{
  -						theNamespace = &attr->getNodeValue();
  +						if (equals(aname, s_XMLNamespace) == true)
  +						{
  +							theNamespace = &attr->getNodeValue();
   
  -						break;
  +							break;
  +						}
   					}
   					else if (startsWith(aname, s_XMLNamespaceWithSeparator) == true) 
   					{
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org