dbertoni    2004/04/19 18:19:59

  Modified:    c/src/xalanc/XMLSupport FormatterToXML_UTF16.cpp
                        FormatterToXML_UTF16.hpp FormatterToXML_UTF8.cpp
                        FormatterToXML_UTF8.hpp FormatterToXMLBase.cpp
                        FormatterToXMLBase.hpp
  Log:
  Don't serialize a linefeed after the XML declaration.
  
  Revision  Changes    Path
  1.10      +4 -6      
xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF16.cpp
  
  Index: FormatterToXML_UTF16.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF16.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FormatterToXML_UTF16.cpp  26 Feb 2004 22:37:44 -0000      1.9
  +++ FormatterToXML_UTF16.cpp  20 Apr 2004 01:19:58 -0000      1.10
  @@ -158,7 +158,7 @@
        write(XalanUnicode::charQuoteMark);
        write(XalanUnicode::charGreaterThanSign);
   
  -     outputLineSep();
  +     outputNewline();
   }
   
   
  @@ -335,7 +335,7 @@
        // is not significant.
        if (outsideDocumentElement() == true)
        {
  -             outputLineSep();
  +             outputNewline();
        }
   }
   
  @@ -463,7 +463,7 @@
   {
        if(XalanUnicode::charLF == ch)
        {
  -             outputLineSep();
  +             outputNewline();
        }
        else
        {
  @@ -641,14 +641,12 @@
        }
   
        write(s_xmlHeaderEndString, s_xmlHeaderEndStringLength);
  -
  -     outputLineSep();
   }
   
   
   
   void
  -FormatterToXML_UTF16::outputLineSep()
  +FormatterToXML_UTF16::outputNewline()
   {
        assert(m_newlineString != 0 && length(m_newlineString) == 
m_newlineStringLength);
   
  
  
  
  1.10      +2 -5      
xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF16.hpp
  
  Index: FormatterToXML_UTF16.hpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF16.hpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FormatterToXML_UTF16.hpp  26 Feb 2004 22:37:44 -0000      1.9
  +++ FormatterToXML_UTF16.hpp  20 Apr 2004 01:19:59 -0000      1.10
  @@ -134,11 +134,8 @@
                        const XMLCh*    chars,
                        unsigned int    length);
   
  -     /**
  -      * Output a line break.
  -      */
  -     void
  -     outputLineSep();
  +     virtual void
  +     outputNewline();
   
        /**
         * Escape and write a character.
  
  
  
  1.12      +4 -6      xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF8.cpp
  
  Index: FormatterToXML_UTF8.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF8.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- FormatterToXML_UTF8.cpp   26 Feb 2004 22:37:44 -0000      1.11
  +++ FormatterToXML_UTF8.cpp   20 Apr 2004 01:19:59 -0000      1.12
  @@ -398,7 +398,7 @@
        write(char(XalanUnicode::charQuoteMark));
        write(char(XalanUnicode::charGreaterThanSign));
   
  -     outputLineSep();
  +     outputNewline();
   }
   
   
  @@ -590,7 +590,7 @@
        // is not significant.
        if (outsideDocumentElement() == true)
        {
  -             outputLineSep();
  +             outputNewline();
        }
   }
   
  @@ -726,7 +726,7 @@
   {
        if (XalanUnicode::charLF == ch)
        {
  -             outputLineSep();
  +             outputNewline();
        }
        else if (isUTF16HighSurrogate(ch) == true)
        {
  @@ -917,14 +917,12 @@
        }
   
        write(s_xmlHeaderEndString, s_xmlHeaderEndStringLength);
  -
  -     outputLineSep();
   }
   
   
   
   void
  -FormatterToXML_UTF8::outputLineSep()
  +FormatterToXML_UTF8::outputNewline()
   {
        assert(m_newlineString != 0 && length(m_newlineString) == 
m_newlineStringLength);
   
  
  
  
  1.10      +2 -2      xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF8.hpp
  
  Index: FormatterToXML_UTF8.hpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF8.hpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FormatterToXML_UTF8.hpp   26 Feb 2004 22:37:44 -0000      1.9
  +++ FormatterToXML_UTF8.hpp   20 Apr 2004 01:19:59 -0000      1.10
  @@ -137,8 +137,8 @@
        /**
         * Output a line break.
         */
  -     void
  -     outputLineSep();
  +     virtual void
  +     outputNewline();
   
        /**
         * Escape and write a character.
  
  
  
  1.10      +6 -0      xml-xalan/c/src/xalanc/XMLSupport/FormatterToXMLBase.cpp
  
  Index: FormatterToXMLBase.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToXMLBase.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FormatterToXMLBase.cpp    26 Feb 2004 22:37:44 -0000      1.9
  +++ FormatterToXMLBase.cpp    20 Apr 2004 01:19:59 -0000      1.10
  @@ -241,6 +241,12 @@
        if(m_shouldWriteXMLHeader == true)
        {
                writeXMLHeader();
  +
  +        // Write a newline here, so the DOCTYPE comes out on a separate line
  +        if (m_needToOutputDoctypeDecl == true)
  +        {
  +            outputNewline();
  +        }
        }
   }
   
  
  
  
  1.4       +3 -0      xml-xalan/c/src/xalanc/XMLSupport/FormatterToXMLBase.hpp
  
  Index: FormatterToXMLBase.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToXMLBase.hpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FormatterToXMLBase.hpp    26 Feb 2004 22:37:44 -0000      1.3
  +++ FormatterToXMLBase.hpp    20 Apr 2004 01:19:59 -0000      1.4
  @@ -211,6 +211,9 @@
                        const XMLCh*    chars,
                        unsigned int    length) = 0;
   
  +     virtual void
  +     outputNewline() = 0;
  +
        /**
         * Mark the parent element as having a child.  If this
         * is the first child, return true, otherwise, return
  
  
  

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

Reply via email to