sboag       00/10/17 12:25:48

  Modified:    java/src/org/apache/xml/serialize/transition Printer.java
  Log:
  Remove line break normalization.  Ain't worth it.
  
  Revision  Changes    Path
  1.7       +9 -73     
xml-xalan/java/src/org/apache/xml/serialize/transition/Printer.java
  
  Index: Printer.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xml/serialize/transition/Printer.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Printer.java      2000/10/13 16:36:15     1.6
  +++ Printer.java      2000/10/17 19:25:46     1.7
  @@ -71,7 +71,7 @@
    * [EMAIL PROTECTED] IndentPrinter} supports indentation and line wrapping by
    * extending this class.
    *
  - * @version $Revision: 1.6 $ $Date: 2000/10/13 16:36:15 $
  + * @version $Revision: 1.7 $ $Date: 2000/10/17 19:25:46 $
    * @author <a href="mailto:[EMAIL PROTECTED]">Assaf Arkin</a>
    */
   public class Printer
  @@ -208,27 +208,8 @@
                       _writer.write( _buffer );
                       _pos = 0;
                   }
  -                // -sb Normalize linebreaks.
  -                char c = text.charAt( i );
  -                if ((0x0D == c) && ((i+1) < length) && (0x0A==text.charAt( 
i+1 ))) 
  -                {
  -                  breakLine();
  -                  i++;
  -                }
  -                else if ((0x0A == c) && ((i+1) < length) && 
(0x0D==text.charAt( i+1 ))) 
  -                {
  -                  breakLine();
  -                  i++;
  -                }
  -                else if((0x0A == c) || ('\n' == c))
  -                {
  -                  breakLine();
  -                }
  -                else
  -                {
  -                  _buffer[ _pos ] = text.charAt( i );
  -                  ++_pos;
  -                }
  +                _buffer[ _pos ] = text.charAt( i );
  +                ++_pos;
               }
           } catch ( IOException except ) {
               // We don't throw an exception, but hold it
  @@ -247,28 +228,9 @@
                   if ( _pos == BufferSize ) {
                       _writer.write( _buffer );
                       _pos = 0;
  -                }
  -                // -sb Normalize linebreaks.
  -                char c = text.charAt( i );
  -                if ((0x0D == c) && ((i+1) < length) && (0x0A==text.charAt( 
i+1 ))) 
  -                {
  -                  breakLine();
  -                  i++;
  -                }
  -                else if ((0x0A == c) && ((i+1) < length) && 
(0x0D==text.charAt( i+1 ))) 
  -                {
  -                  breakLine();
  -                  i++;
  -                }
  -                else if((0x0A == c) || ('\n' == c))
  -                {
  -                  breakLine();
                   }
  -                else
  -                {
  -                  _buffer[ _pos ] = text.charAt( i );
  -                  ++_pos;
  -                }
  +                _buffer[ _pos ] = text.charAt( i );
  +                ++_pos;
               }
           } catch ( IOException except ) {
               // We don't throw an exception, but hold it
  @@ -286,28 +248,9 @@
                   if ( _pos == BufferSize ) {
                       _writer.write( _buffer );
                       _pos = 0;
  -                }
  -                // -sb Normalize linebreaks.
  -                char c = chars[ start ];
  -                if ((0x0D == c) && (length>1) && (0x0A==chars[ start+1 ])) 
  -                {
  -                  breakLine();
  -                  ++start;
  -                }
  -                else if ((0x0A == c) && (length>1) && (0x0D==chars[ start+1 
])) 
  -                {
  -                  breakLine();
  -                  ++start;
  -                }
  -                else if((0x0A == c) || ('\n' == c))
  -                {
  -                  breakLine();
                   }
  -                else
  -                {
  -                  _buffer[ _pos ] = chars[ start ];
  -                  ++_pos;
  -                }
  +                _buffer[ _pos ] = chars[ start ];
  +                ++_pos;
                   ++start;
               }
           } catch ( IOException except ) {
  @@ -325,16 +268,9 @@
               if ( _pos == BufferSize ) {
                   _writer.write( _buffer );
                   _pos = 0;
  -            }
  -            if((0x0A == ch) || ('\n' == ch))
  -            {
  -              breakLine();
  -            }
  -            else
  -            {
  -              _buffer[ _pos ] = ch;
  -              ++_pos;
               }
  +            _buffer[ _pos ] = ch;
  +            ++_pos;
           } catch ( IOException except ) {
               // We don't throw an exception, but hold it
               // until the end of the document.
  
  
  

Reply via email to