dbertoni    01/04/10 19:26:31

  Modified:    c/src/XMLSupport FormatterToXML.cpp
  Log:
  Handle ignorableWhitespace() without calling up to characters().
  
  Revision  Changes    Path
  1.46      +27 -4     xml-xalan/c/src/XMLSupport/FormatterToXML.cpp
  
  Index: FormatterToXML.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XMLSupport/FormatterToXML.cpp,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- FormatterToXML.cpp        2001/02/09 19:31:42     1.45
  +++ FormatterToXML.cpp        2001/04/11 02:26:31     1.46
  @@ -1124,9 +1124,33 @@
                        const XMLCh* const      chars,
                        const unsigned int      length)
   {
  -     if (length > 0)
  +     if(m_inEntityRef == false && length != 0)
        {
  -             characters(chars, length);
  +             assert(isXMLWhitespace(chars, 0, length));
  +
  +             if(m_inCData == true)
  +             {
  +                     cdata(chars, length);
  +             }
  +             else if(m_nextIsRaw)
  +             {
  +                     m_nextIsRaw = false;
  +
  +                     charactersRaw(chars, length);
  +             }
  +             else
  +             {
  +                     writeParentTagEnd();
  +
  +                     m_ispreserve = true;
  +
  +                     accumContent(chars, 0, length);
  +
  +                     if (m_isprevtext == false)
  +                     {
  +                             m_isprevtext = true;
  +                     }
  +             }
        }
   }
   
  @@ -1245,8 +1269,7 @@
   
                        m_isprevtext = false;
   
  -                     m_elemStack.pop_back();
  -                     m_elemStack.push_back(true);
  +                     m_elemStack.back() = true;
   
                        m_preserves.push_back(m_ispreserve);
                }
  
  
  

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

Reply via email to