dbertoni    02/05/15 17:47:55

  Modified:    c/src/XSLT ResultNamespacesStack.cpp
  Log:
  Don't add empty namespace for initially.
  
  Revision  Changes    Path
  1.7       +5 -21     xml-xalan/c/src/XSLT/ResultNamespacesStack.cpp
  
  Index: ResultNamespacesStack.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ResultNamespacesStack.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ResultNamespacesStack.cpp 13 Aug 2001 17:08:53 -0000      1.6
  +++ ResultNamespacesStack.cpp 16 May 2002 00:47:55 -0000      1.7
  @@ -86,29 +86,13 @@
        {
                m_resultNamespaces.resize(m_resultNamespaces.size() + 1);
   
  -             m_resultNamespaces.back().resize(1);
  -
                m_createNewContextStack.back() = false;
        }
   
        NamespaceVectorType&    theCurrentNamespaces = 
m_resultNamespaces.back();
   
  -     NameSpace&                              theCurrentNamespace = 
theCurrentNamespaces.front();
  -
  -     // If the last vector contains only an empty namespace, replace it with 
a
  -     // new vector containing only this namespace
  -     if(length(theCurrentNamespace.getURI()) == 0 &&
  -        length(theCurrentNamespace.getPrefix()) == 0)
  -     {
  -             theCurrentNamespace.setPrefix(thePrefix);
  -
  -             theCurrentNamespace.setURI(theNamespaceURI);
  -     }
  -     else
  -     {
  -             // Otherwise, add the namespace at the end of the current 
namespaces.
  -             theCurrentNamespaces.push_back(NameSpace(thePrefix, 
theNamespaceURI));
  -     }
  +     // Add the namespace at the end of the current namespaces.
  +     theCurrentNamespaces.push_back(NameSpace(thePrefix, theNamespaceURI));
   }
   
   
  @@ -116,7 +100,7 @@
   void
   ResultNamespacesStack::pushContext()
   {
  -     if (m_createNewContextStack.size() == 0)
  +     if (m_createNewContextStack.empty() == true)
        {
                
m_createNewContextStack.reserve(eDefaultCreateNewContextStackSize);
        }
  @@ -129,11 +113,11 @@
   void
   ResultNamespacesStack::popContext()
   {
  -     assert(m_createNewContextStack.size() != 0);
  +     assert(m_createNewContextStack.empty() == false);
   
        if (m_createNewContextStack.back() == false)
        {
  -             assert(m_resultNamespaces.size() != 0);
  +             assert(m_resultNamespaces.empty() == false);
   
                m_resultNamespaces.pop_back();
        }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to